We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
В логах базы много запросов вида:
SELECT id, full_url FROM shop_page WHERE (domain = 'S' AND route = 'S') AND (status = N)
при том что на таблице нет индексов по этим полям:
> SHOW INDEX FROM shop_page\G *************************** 1. row *************************** Table: shop_page Non_unique: 0 Key_name: PRIMARY Seq_in_index: 1 Column_name: id Collation: A Cardinality: 12037 Sub_part: NULL Packed: NULL Null: Index_type: BTREE Comment: Index_comment: 1 row in set (0.00 sec)
По этому в ситуации:
> select count(*) from shop_page; +----------+ | count(*) | +----------+ | 12019 | +----------+ 1 row in set (0.00 sec)
Фуллскан выглядит очень печально:
# Query_time: 0.023135 Lock_time: 0.000159 Rows_sent: 20 Rows_examined: 12019 SET timestamp=1510639362; SELECT id, full_url FROM shop_page WHERE (domain = 'example.com' AND route = '*') AND (status = 1);
> explain SELECT id, full_url FROM shop_page WHERE (domain = 'example.com' AND route = '*') AND (status = 1)\G *************************** 1. row *************************** id: 1 select_type: SIMPLE table: shop_page type: ALL possible_keys: NULL key: NULL key_len: NULL ref: NULL rows: 12037 Extra: Using where
The text was updated successfully, but these errors were encountered:
No branches or pull requests
В логах базы много запросов вида:
SELECT id, full_url FROM shop_page WHERE (domain = 'S' AND route = 'S') AND (status = N)
при том что на таблице нет индексов по этим полям:
По этому в ситуации:
Фуллскан выглядит очень печально:
The text was updated successfully, but these errors were encountered: