gunslinger23 / maniadminplugin

Automatically exported from code.google.com/p/maniadminplugin
1 stars 1 forks source link

Improve database queries, 0 #213

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
First improvement suggestion for database queries.

Looking at the database queries, there's room for improvement by adding 
§LIMIT§ to many of them, when you know there'll always be the same count of 
results if the match does exist. That tells the driver it can stop looking 
after the mentioned count, speeding up query, although not massively, but if 
the database is taking unnecessarily long to find all the matches, it can mean 
difference between life and death.

The LIMIT applies to
- SELECT
- DELETE
- UPDATE

See http://pastebin.com/fTmQ7Lav for an example.

Original issue reported on code.google.com by JouniJarvis on 28 Jul 2014 at 11:29