@yossiz
אני מצוטט:
EXPLAIN ANALYZE
SELECT COUNT(*) FROM `LogPlaybackPlayStop` WHERE `ProjectID` = 'tifertMoshe'
ה CPU קפץ ל30 אחוז (לעומת 1-3 לפי ואחרי).
התוצאה:
-> Aggregate: count(0) (actual time=347.026..347.027 rows=1 loops=1)
-> Index lookup on LogPlaybackPlayStop using ProjectID (ProjectID='tifertMoshe') (cost=72277.48 rows=641706) (actual time=0.080..303.072 rows=354415 loops=1)
שליפת השורות:
EXPLAIN ANALYZE
SELECT * FROM `LogPlaybackPlayStop` WHERE `ProjectID` = 'tifertMoshe' ORDER BY `EnterDate` DESC, `EnterTime` DESC LIMIT 2000
ה CPU קפץ ל 100.
וזה התוצאה:
-> Limit: 2000 row(s) (actual time=2294.114..2297.032 rows=2000 loops=1)
-> Sort: LogPlaybackPlayStop.EnterDate DESC, LogPlaybackPlayStop.EnterTime DESC, limit input to 2000 row(s) per chunk (cost=392030.59 rows=641706) (actual time=2294.113..2296.869 rows=2000 loops=1)
-> Index lookup on LogPlaybackPlayStop using ProjectID (ProjectID='tifertMoshe') (actual time=0.533..1787.849 rows=354415 loops=1)