N¬™ë,j°jËkj{zºÞw…«k‰©oz»"¢z ‰¦ºx†jטúèDear all,
I have asked the question days before, but no one seems interested in it.... Considering table imgstore, defined as create table a ( imgid int not null, parent int, imgtype char(3), img longtext, primary key (imgid), key searchkey (parent, imgid) ) type = innodb; contains about 10000+ rows, about 800M in size; SQL tested: T1) select imgid, parent from a where parent = 10; returns 3357 rows in 0.08 sec. T2) select imgid, parent, imgtype from a where parent = 10; return 3357 rows in 8.32 sec.!!! T3) select imgid, parent from a where parent = 10 order by imgid; returns 3357 rows in 0.1 sec T4) select imgid, parent, imgtype from a where parent = 10 order by imgid; returns 3357 rows in 25.88 sec!!! T5) create table za select imgid, parent, imgtype from a; 10102 rows in 1.71 sec. T6) select imgid, parent, imgtype from za where parent = 10 order by imgid; 3357 rows in 0.02 sec. T7) After change the searchkey to (parent, imgid, imgtype), T1/T2, T3/T4 runs in almost same speed. Anybody can explain my questions: Q1- What cause the slow down, T2 vs T1 and T4 vs T3? Q2- Can I assume mysql pooly handled on large BLOB data, by comparing performance of T6 and T4? Best Reguards.