Skip to content
Advertisement

I need to optimize tables and queries

I have 3 tables: info, data, link, there is a request for data:

offer optimization options: a) tables b) request. Queries for creating tables:

Thanks!

Advertisement

Answer

Never use commas in the FROM clause. Always use proper, explicit, standard, readable JOIN syntax:

Second, for this query your indexes are probably fine. I would also recommend a primary key index on link:

This is a good idea in general, even if it is not specific to this query.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement