Afficher un message
Vieux 16/09/2007, 19h10   #2
Brian Wakem
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: adding LIMIT 1 to improve performance?

Lo'oris wrote:

> On 15 Set, 16:17, "J.O. Aho" <u...@example.net> wrote:
>> Lo'oris wrote:
>> > has a condition such as " WHERE primary_key='$x' ", adding "LIMIT 1"

>>
>> Here is the official version with some user
>> comments:http://dev.mysql.com/doc/refman/5.0/...imization.html

>
> but it does not talk about primary keys :/



Why don't you write a script to benchmark it? Do it with and without LIMIT
1 a few hundred thousand times each, repeat the test half-a-dozen times and
post your results.

Make sure you turn off query cache first if the queries are selects.


--
Brian Wakem
  Réponse avec citation
 
Page generated in 0,04115 seconds with 9 queries