Ah I see. A search over a non existant type costs over 40 seconds.
DESCRIBE gives no
INDEX on img_minor_mime.
Bryan
On 4/5/07, Simetrical <Simetrical+wikilist(a)gmail.com> wrote:
On 4/5/07, Bryan Tong Minh
<bryan.tongminh(a)gmail.com> wrote:
I just tried on the Toolserver to get the latest
ten uploaded SVGs:
SELECT img_name, img_user_text FROM image WHERE img_minor_mime = 'svg'
ORDER BY img_timestamp DESC LIMIT 10;
Takes between 0.00 and 0.02 secs. I don't know how this is comparable
with the "real" databases?
Well, try DESCRIBE TABLE image; to see if there are indices (I only
know that there aren't in tables.sql), or EXPLAIN [your query] to see
how many rows it's examining. Possibly, since there are so few image
types, it's "fast enough" to just scan through rows until you get to
your tenth SVG image, but heaven preserve you if someone tries to
search for a type that has few or no entries and you need a full or
substantially full table scan. Then again, maybe there are indices on
those fields in the live databases, I don't know.
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/wikitech-l