Lurker News
I too often find myself getting stuck when it comes to more advanced SQL queries. I have never actively learnt SQL and realise that I don't have a great mental model of how it works. I would like to improve this as it is killing my productivity from time to time.

Comments (97) 45 threads

Earlier comments
gjkood1 reply#
One of the useful things that I learned as I began to use SQL is to learn how to use and analyze query plans.

This will take you from the theory of indexes to actually seeing how it is used by the SQL engine.
This will go a long way to building the right indexes and SQL tuning in general.
I would suggest learning how to generate the query plans for your SQL engine of choice.

jorgeleo1 reply#
This!

This is key. I cannot count how many times I go to a client that is complaining that their software is slow and ends up that is because they don't have the right indexes

gjkood#
The difference between a poorly performing product that uses an RDBMS backend and a highly performant one is purely down to SQL query tuning and finding the right indexes.

It is the lowest hanging fruit to improve performance.
Even if you don't have the flexibility to change the SQL on a project, you may still have the ability to create/rebuild the indexes to make the query faster.

pmtarantino2 replies#
I dont know if this is the right place to ask it, but I will go:

Sometimes I see job offers that ask for experience with large websites, large databases, large servers, etc, etc, etc (you get the idea).
How do you land those jobs if getting in that kind of subject is impossible alone? You can't simulate that kind of things at your home, so unless your side project grow and you must learnt it the hard way, or you had luck to be at a company where they allowed you to be involved, how do you learn that? Thank you

agotterer1 reply#
You don't need to work for a company with large datasets to start learning and playing with large datasets. There are freely available repositories of data you can play with. Checkout the AWS public datasets - https://aws.amazon.com/public-datasets/. There should be more then enough there for you to start playing with "big data" tools and getting familiar with how to store, ETL, and query large datasets.
pmtarantino#
Yes, but when a company asks for experience they aren't thinking in playing with large datasets unless you create an open source tool that becomes useful for a lot of people. Just playing with them wouldn't be suffice.
tacostakohashi#
A "large dataset" is basically one that doesn't fit in memory. It doesn't need to be large in absolute terms.

Load more comments