Answer the question
In order to leave comments, you need to log in
Where is the best place to learn sql?
Hello everyone, I am a PHP programmer, I work with the database at the level (select, insert, delete).
Here I ran into database optimization, and in the process I googled, I would like to learn this part, what would you advise?
I found interactive tutorials on sql, but there are tasks like "Make a selection with such and such conditions", etc. they don’t like it, because I understand it all, I would like subtleties.
For example:
How to normalize a database, how to structure data, how to correctly hang up indexes, where they are needed, where they are not, what queries are better to compose, etc.
It would be desirable any course or a cycle of articles on sql'yu.
Thank you in advance.
Answer the question
In order to leave comments, you need to log in
I'm slowly doing exercises on www.sql-ex.ru , studying the information necessary for solving
Write a Highload project, for example, collect some information from sites.
In the process of writing code, you will start to google pointwise about query optimization and over time a common understanding will come.
if you are participating in a project where there is already a database, then do not bother with normalization (now, to speed up, sometimes they even go away from it towards data denormalization, but you definitely don’t need it yet)
1. learn to catch queries that take a long time (by the total total time CPU work)
to do this, learn to monitor such things (zabbix, pgbadger, logs)
2. after identifying resource-intensive requests, see them explain
3. optimize these exploits in the direction of improving the cost of the request (or in the direction of reducing the consumption of shared buffers if the project is highly loaded and there are many users)
I am currently reading "High Performance MySQL", third edition. There is quite a lot of information about performance evaluation, query optimization, indexes, how different MySQL engines work, etc. You may also find this book useful.
I was also looking for courses on a similar topic. I didn't find any courses.
Krinke's book database building theory. Clear and concise with examples!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question