[snip]
When i do a query from a big table using indexes,it takes for example 5
seconds. Now if i, after
some time repeat the query, the query takes about 0.5 secs.
So far i thought it was because of caching, but now i read mysql (v3.23)
doesnt
support query cache. So this really gets me wondering, where does the
speed increase come from?
[/snip]
As I understand it, queries create temporary indexes specific to the query.
The same (same) query will be theoretically much quicker if those temp
indexes are there. But you can't count on them. Here's why...
Me -----------------> Query DB
Create TMP INDEX
Query DB <--------------------- Someone else
Destroy Existing TMP INDEX
Create New TMP INDEX
Me -----------------> Re-Query DB (same query as before)
Destroy Existing TMP INDEX
Create New TMP INDEX
And so on <----------------------Someone else
Hope this helps as this is the way it was explained to me quite a long time
ago, so I may not have the flow exactly right.
Jay Blanchard
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php