uzasno spor obican select upit , tabela 1GB sa 700000 redova
vise ne znam sta da optimizujem kad obican select traje i vise od minut, server je sa 8gb ram, mysql 5.1.58
tabela ima 700000rows
npr ovaj upit
SELECT record_num,title FROM content ORDER BY record_num DESC LIMIT 668936,36
first time execution: 175sec!!!
Showing rows 0 - 29 ( 36 total, Query took 175.9067 sec)
second time is ok
Showing rows 0 - 29 ( 36 total, Query took 0.0003 sec)
svi ovi upiti se PRVI put uzasno sporo izvrsavaju, dok kad se refreshuju ili opet izvrsi ISTI upit onda sve bude normalno oko 1sec
SELECT record_num,title FROM content ORDER BY record_num DESC LIMIT 587456,36
SELECT record_num,title FROM content ORDER BY record_num DESC LIMIT 452369,36
SELECT record_num,title FROM content ORDER BY record_num DESC LIMIT 698745,36
isto se desava sa fulltext pretragom, prvi put katastrofa, dok sledeci put bolje
koristi se memcache na serveru, ali dzabe to kad se prvi put ceka ogromno vreme
.
svaka pomoc dobrodosla!
znam za resenje WHERE record_num >698745 AND record_num <698835
ali to ne mogu da odradim jer ima "rupa" medju record_num, a i da to odradim za select ne bih mogao za fulltext search
|