-3

I have a table called daily_key_value_dma_summary. It has some rows around 1Mill.

But when the fire the below EXPLAIN, It is showing rows bing scanned is 0.

EXPLAIN select key_value_pair_bridge_dim_id from  daily_key_value_dma_summary limit 10 ;

When I execute the same with out EXPLAIN, it is resulting 10 records.

select key_value_pair_bridge_dim_id from  daily_key_value_dma_summary  limit 10 ;

Thanks in advance.

konsolenfreddy
  • 9,551
  • 1
  • 25
  • 36
Uday
  • 1,480
  • 4
  • 27
  • 44

1 Answers1

0

Try to understand what your query calls for. You are not searching something in table. query asks for a column key_value_pair_bridge_dim_id from daily_key_value_dma_summary and then says limit number of rows to 10. so there is no need to scan the entire table. MySQL will just return first 10 rows without scanning through entire table.

Uday Sawant
  • 5,748
  • 3
  • 32
  • 45
  • to my surprise "SHOW TABLE STATUS LIKE" also show all 0 for no of rows, avg row length...etc though there are rows in the table.... How to interpret this....? – Uday Feb 07 '12 at 07:14
  • I am quite unaware about these keywords, need to go through it – Uday Sawant Feb 07 '12 at 07:21