Сообщение Alex Keda » 2010-09-25 15:03:47
я не к этому веду...
Код: Выделить всё
440623 h9514_bill localhost h9514_bill Query 1 Sorting result SELECT `ID` FROM `Tasks` WHERE (`IsActive` = 'yes' AND `IsExecuted` = 'no' AND `ExecuteDate` < UNIX_TIMESTAMP() AND `Errors` < 5) ORDER BY `CreateDate` DESC LIMIT 0, 1
440623 h9514_bill localhost h9514_bill Query 2 Sorting result SELECT `ID` FROM `Tasks` WHERE (`IsActive` = 'yes' AND `IsExecuted` = 'no' AND `ExecuteDate` < UNIX_TIMESTAMP() AND `Errors` < 5) ORDER BY `CreateDate` DESC LIMIT 0, 1
440623 h9514_bill localhost h9514_bill Query 1 Sorting result SELECT `ID` FROM `Tasks` WHERE (`IsActive` = 'yes' AND `IsExecuted` = 'no' AND `ExecuteDate` < UNIX_TIMESTAMP() AND `Errors` < 5) ORDER BY `CreateDate` DESC LIMIT 0, 1
440623 h9514_bill localhost h9514_bill Query 2 Sorting result SELECT `ID` FROM `Tasks` WHERE (`IsActive` = 'yes' AND `IsExecuted` = 'no' AND `ExecuteDate` < UNIX_TIMESTAMP() AND `Errors` < 5) ORDER BY `CreateDate` DESC LIMIT 0, 1
440623 h9514_bill localhost h9514_bill Query 1 Sorting result SELECT `ID` FROM `Tasks` WHERE (`IsActive` = 'yes' AND `IsExecuted` = 'no' AND `ExecuteDate` < UNIX_TIMESTAMP() AND `Errors` < 5) ORDER BY `CreateDate` DESC LIMIT 0, 1
не находите что долго?
таблица Tasks - ~179,796 записей
я уже предлагал сделать расчленёнку по годам чтоли...
ещё болше ServersUpTime - 1,520,979 - но, она MyISAM - там выборки гораздо быстрей
Events - 316,166 - опять же MyISAM - всё без проблем
я не к этому веду...
[code]440623 h9514_bill localhost h9514_bill Query 1 Sorting result SELECT `ID` FROM `Tasks` WHERE (`IsActive` = 'yes' AND `IsExecuted` = 'no' AND `ExecuteDate` < UNIX_TIMESTAMP() AND `Errors` < 5) ORDER BY `CreateDate` DESC LIMIT 0, 1
440623 h9514_bill localhost h9514_bill Query 2 Sorting result SELECT `ID` FROM `Tasks` WHERE (`IsActive` = 'yes' AND `IsExecuted` = 'no' AND `ExecuteDate` < UNIX_TIMESTAMP() AND `Errors` < 5) ORDER BY `CreateDate` DESC LIMIT 0, 1
440623 h9514_bill localhost h9514_bill Query 1 Sorting result SELECT `ID` FROM `Tasks` WHERE (`IsActive` = 'yes' AND `IsExecuted` = 'no' AND `ExecuteDate` < UNIX_TIMESTAMP() AND `Errors` < 5) ORDER BY `CreateDate` DESC LIMIT 0, 1
440623 h9514_bill localhost h9514_bill Query 2 Sorting result SELECT `ID` FROM `Tasks` WHERE (`IsActive` = 'yes' AND `IsExecuted` = 'no' AND `ExecuteDate` < UNIX_TIMESTAMP() AND `Errors` < 5) ORDER BY `CreateDate` DESC LIMIT 0, 1
440623 h9514_bill localhost h9514_bill Query 1 Sorting result SELECT `ID` FROM `Tasks` WHERE (`IsActive` = 'yes' AND `IsExecuted` = 'no' AND `ExecuteDate` < UNIX_TIMESTAMP() AND `Errors` < 5) ORDER BY `CreateDate` DESC LIMIT 0, 1[/code]
не находите что долго?
таблица Tasks - ~179,796 записей
я уже предлагал сделать расчленёнку по годам чтоли...
ещё болше ServersUpTime - 1,520,979 - но, она MyISAM - там выборки гораздо быстрей
Events - 316,166 - опять же MyISAM - всё без проблем