A constant pain for every developer is how to handle sql queries of a database table with many, many, many rows. Well, here some tips for better sql queries.
1. Indexes
Indexes are basically shortcuts for the database — instead of scanning the whole table row by row, it can jump straight to what you need. For example, let’s say we’re always looking up orders by customer_id. Instead of the database digging through everything, we can help it out by creating an index. To create an index on a specified column you simply write...
read more
Top comments (0)