I have the following mysql query
explain SELECT count(*) as assetCount FROM MdhRawAsset m where sysCreationDate > date_add(now(), INTERVAL -1 DAY) AND sysCreationDate <= now() AND itemType = 'TS';
Results:
| id | select_type | table | type |possible_keys | 1 | SIMPLE | m | range | MdhRawAsset_on_sysCreationDate, MdhRawAsset_itemType --------------------------------------------------------------------- |Key |Key_len | ref | rows | Extra | MdhRawAsset_on_sysCreationDate| 8 | NULL | 53269 | Using where |
Questions:
MdhRawAsset
The query execution time depends on too many questions to determine how long it takes. Upload to server, number of lines, etc. The best you can do is run it in a typical boot and see how long it takes.
, , , , - , .
count (id) . , , *, .
-, , , , .
w.r.t. ,
... KEY itemType_sysCreationDate (itemType, sysCreationDate) ...
. . , .
, "now()" , , mysql - , , , . , MySQL.;)
? .
, , -
- , .
- , datawarehousing . " " ( ), ( ).
, , - . , , _summary_count = existing_summary_count + 1, , .
MS-SQL, , , - . , . , , , show index from <table> explain ....
show index from <table>
explain ...
itemType sysCreationDate. .
itemType
sysCreationDate
Source: https://habr.com/ru/post/1773718/More articles:spring tx: ΡΠ΅ΠΆΠΈΠΌ ΠΈΠ³Π½ΠΎΡΠΈΡΠΎΠ²Π°Π½ΠΈΡ, Π·Π°Π²ΠΈΡΡΡΠΈΠΉ ΠΎΡ Π°Π½Π½ΠΎΡΠ°ΡΠΈΠΉ, ΠΊΠΎΠ³Π΄Π° Π²ΠΎ Π²ΡΠ΅ΠΌΡ Π·Π°Π³ΡΡΠ·ΠΊΠΈ Π²ΠΎ Π²ΡΠ΅ΠΌΡ Π·Π°Π³ΡΡΠ·ΠΊΠΈ - springhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1773714/programmatically-converting-adobe-image-files-to-jpg&usg=ALkJrhiMkGS7iN5FoLTQFSITi5E5QM-NKQΠ‘Π°ΠΌΡΠΉ ΡΡΡΠ΅ΠΊΡΠΈΠ²Π½ΡΠΉ ΡΠΏΠΎΡΠΎΠ± ΠΏΠ΅ΡΠ°ΡΠΈ ΡΡΡΠΎΠΊ Π² Python? - performanceDistributing python modules for another architecture - pythonSolution for shopping optimization - performanceWHERE cascading clause inside VIEW with UNION - mysqlMySQL View, ΡΠΎΠ΄Π΅ΡΠΆΠ°ΡΠΈΠΉ UNION, Π½Π΅ ΠΎΠΏΡΠΈΠΌΠΈΠ·ΠΈΡΠΎΠ²Π°Π½ Ρ ΠΎΡΠΎΡΠΎ... ΠΡΡΠ³ΠΈΠΌΠΈ ΡΠ»ΠΎΠ²Π°ΠΌΠΈ, SLOW! - performanceQt / C ++ QTableWidget: Doing something when the header is double-clicked - c ++Color of selected item in ListView - c #Put it in codebehind or in ViewModel - wpfAll Articles