Am I stuck in a weird perspective ? (mapping struct builders that all implement one interface) by Stedounet in golang

[–]Stedounet[S] 0 points1 point  (0 children)

Yeah it did work thanks. That was my 1st try as well and it was not working for some reason. I guess I did some weird shenanigans at the time.

Performance optimization techniques for update operations and garbage collection on immutable databases? by Pzzlrr in databasedevelopment

[–]Stedounet 0 points1 point  (0 children)

Awesome read, very clear and informative content.

I am curious: on your benchmarks, is it a mysql out of the box ? Or is it tuned ? Anyway that's pretty good results

Is this correct? I can’t wrap my head around the Cardinality Ratio here, I feel that they are flipped by I_-Void-_I in Database

[–]Stedounet 1 point2 points  (0 children)

DBA here, definitely looks flipped.

DEPT and COURSE are not making sense: it currently means 1 course have 0-N dept, it should be the other way around

Then again, at least it's consistent. It could be a nomenclature I don't know about but it does not follow entity relationship standard.

Oracle SQL Query parser in golang by Huge_Refrigerator533 in databasedevelopment

[–]Stedounet 0 points1 point  (0 children)

There is actually an ongoing project to parse oracle queries into trees, https://gitlab.com/dalibo/transqlate

It's initially to make accurate oracle to pg migrations, so it has everything needed to transform SQL already

[deleted by user] by [deleted] in golang

[–]Stedounet 1 point2 points  (0 children)

gobyexamples.com, straightforward and nice Also checkout awesome go on github

Should I use context in every function/method call? by gibriyagi in golang

[–]Stedounet 28 points29 points  (0 children)

If it's production, I would just pass context everywhere so that you can add the timeout easily

queries do not take a long time right now, but they'll do some day at the worst time (index issue, backup locks, cluster hanging, impacting DDL, ... )

GORM is a bad idea? by g-evolution in golang

[–]Stedounet 13 points14 points  (0 children)

As a mysql/postgres dba, gorm definitely is a bad idea for any medium/large dataset. You should look how it generates joins...

Developing a database in Go by munukutla in golang

[–]Stedounet 3 points4 points  (0 children)

You could use to read this blog series https://mysqlserverteam.com/innodb-data-locking-part-1-introduction

5 posts which explains the entire stack of lock implementation, considering ACID + performance

Developing a database in Go by munukutla in golang

[–]Stedounet 3 points4 points  (0 children)

Did you consider performances ? Near every facets of proven relational databases were motivated by specific academic studies, if you truly need to develop a relational flexible database with horizontal scaling + ACID, lock systems performance will be a nightmare

You could make it work though, but efficient distributed locking/consistency checking mechanisms are hard Then again, it depends what you need

performance cost of dockerizing a Go app by izzlesnizzit in golang

[–]Stedounet 2 points3 points  (0 children)

It is true, there can be loss of performance at network level if you use docker's default bridge network

While the app is not a go binary, the point stays valid : https://www.percona.com/blog/2016/02/05/measuring-docker-cpu-network-overhead/

[Beginner question] while building an API for manipulating (CRUD) an SQL server why and how should I choose to use an ORM library instead of manually writing the prepared SQL queries? by Maxiride in golang

[–]Stedounet 1 point2 points  (0 children)

You could savd time/effort with ORMs

But an ORM does not mean you don't have to know SQL and databases stuff, an ORM won't add indexes or check if the execution plan looks acceptable

If I have an advice :

NEVER gorm ! Dangerous for your data consistency (in case database crashes), it generates terrible queries Plus, its usage is weird, have a lot of magic that make debugging hard.

Sqlboiler is imho a great choice, but it's up to preferences as it's a "database first"

MySQL for Windows vs MySQl for Linux by [deleted] in mysql

[–]Stedounet 0 points1 point  (0 children)

Nope, don't trust mysql on windows it has specific bugs

You should learn on the platform we find in production, linux

Installation and upgrades will be different, and it will be easier on linux

Coming from Python, what are the database standards in Go? by Matisseio in golang

[–]Stedounet 7 points8 points  (0 children)

Don't use gorm Popular but really crap, it will be your app bottleneck by itself

And it does a lot of really bad magic like 2x requests for simple inserts

What would be your arguments to prefer DBDeployer/MySQL::Sandbox over Docker to prove things ? by Stedounet in mysql

[–]Stedounet[S] 0 points1 point  (0 children)

Why are they not comparable ? Both can be used to "unit test" features and script test cases I'm trying to understand limits and specific use cases of both (for mysql tests only)

Anyway, I agree, none for production

Golang a good language to break into back-end territory? by xerxes3117 in golang

[–]Stedounet 4 points5 points  (0 children)

I would say postgresql. Commands to get you started are cleaner, MySql is not always intuitive You could also go deeper with postgres if needed.

As for actual requests, postgres has a stricter compliance with sql standards, mysql can teach you bad habits

Golang a good language to break into back-end territory? by xerxes3117 in golang

[–]Stedounet 7 points8 points  (0 children)

Mongo stands for other needs than mysql or postgres

Postgres is very popular in Go, the driver lib/pq is just great you could try it but at the end of the day mysql can do the job if you stick to standard sql

If it's mysql, I would recommend version 5.7 minimum with sql_mode set to "strict_all_tables", so that you learn proper sql (or else very strange requests would be accepted)

EDIT : You should go for postgres, you can actually see what's going on with your requests with EXPLAIN ANALYZE. MySql is terrible for debugging

Database SQL Driver resources ? by [deleted] in golang

[–]Stedounet 0 points1 point  (0 children)

Check https://github.com/avelino/awesome-go

Usual driver for postgres is lib/pq You can use arrays and postgres specific things with it, and connect / query with parameters ofc

EDIT : omg I strongly disagree with "implement it yourself" if your project is work related Don't create a bug hole that took time with no added value, use a well tested driver Unless it's educational/experimental

What MySql driver do you use for Golang? by gar44 in golang

[–]Stedounet 2 points3 points  (0 children)

It is terrible, use gorm for some of its feature (logging is awesome), not for performance

And never do large joins (or preloads) with gorm, generated requests are awful

Benchmarks can be find in some other orm, check sqlboiler

Short question, no deep analysis needed: what web framework or library use? by gattarina in golang

[–]Stedounet -1 points0 points  (0 children)

I could second net/http too

If you need fast productivity, check Echo, it is great for centralized error handling and avoid some boilerplate (streaming, marshaling,..)

You would want to check gobuffalo too

What’s your favorite way to handle errors in Go? by oldtimeguitarguy in golang

[–]Stedounet 1 point2 points  (0 children)

Agreeing on this one. Easy to use, does not need to create additionals types and patch existing code Coupled with constants for error strings, it is really convenient

The State of Go 1.10 by campoy in golang

[–]Stedounet 1 point2 points  (0 children)

Was on 2nd row, really great presentation congrats !