All pastes #87994 Raw Edit

Untitled

public text v1 · immutable
·published 2006-07-14 11:55 UTC
rendered paste body
"EXPLAIN SELECT pp.art_num, pp.showprice as price, pc.custom_price, pc.custom_name, pc.custom_delivery, pd.instock, Stdnsv.Description FROM product_tags pt, products_prices pp, products_dists pd, filter_categories fc, product_linking pl  LEFT JOIN cds_Stdnsv Stdnsv ON (Stdnsv.ProdID = pp.art_num) LEFT JOIN products_custom pc ON (pc.art_num = pp.art_num) WHERE pp.art_num = pl.art_num AND pp.art_num = pd.art_num AND fc.filter_type_id = 1 AND fc.filter_id = pl.filter_id AND (Stdnsv.Description != 'None' OR Stdnsv.Description != '') AND (Stdnsv.Description LIKE '%Media%Center%' OR pl.art_num LIKE '%Media%Center%') GROUP BY pp.art_num ORDER BY pp.showprice DESC LIMIT 100"

+--------+--------+--------------------------+-----------+---------+--------------+-------+---------------------------------+
| table  | type   | possible_keys            | key       | key_len | ref          | rows  | Extra                           |
+--------+--------+--------------------------+-----------+---------+--------------+-------+---------------------------------+
| pp     | ALL    | PRIMARY,art_num          | NULL      |    NULL | NULL         |  8022 | Using temporary; Using filesort |
| pl     | ref    | art_num                  | art_num   |     100 | pp.art_num   |    10 |                                 |
| pd     | ref    | art_num                  | art_num   |     100 | pp.art_num   |    14 |                                 |
| fc     | ref    | filter_id,filter_type_id | filter_id |       4 | pl.filter_id |    12 | Using where                     |
| pt     | index  | NULL                     | PRIMARY   |       4 | NULL         | 65567 | Using index                     |
| Stdnsv | eq_ref | PRIMARY                  | PRIMARY   |      40 | pp.art_num   |     1 | Using where                     |
| pc     | eq_ref | PRIMARY,art_num          | PRIMARY   |     100 | pp.art_num   |     1 |                                 |
+--------+--------+--------------------------+-----------+---------+--------------+-------+---------------------------------+