Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I ran mysql query as below

on a non-partition table

mysql> use test31
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> explain partitions SELECT * FROM my_friends WHERE (requestor = '1234567890' OR contact = '1234567890') AND status = 1 ORDER BY request_id DESC LIMIT 0,100\G
*************************** 1. row ***************************
           id: 1
  select_type: SIMPLE
        table: my_friends
   partitions: NULL
         type: index_merge
possible_keys: friend_index,requestor,contact
          key: friend_index,contact
      key_len: 17,17
          ref: NULL
         rows: 2
        Extra: Using sort_union(friend_index,contact); Using where; Using filesort
1 row in set (0.00 sec)

on a partition table

mysql> explain partitions SELECT * FROM my_friends WHERE (requestor = '1234567890' OR contact = '1234567890') AND status = 1 ORDER BY request_id DESC LIMIT 0,100\G
*************************** 1. row ***************************
           id: 1
  select_type: SIMPLE
        table: my_friends
   partitions: p1_p1sp0,p1_p1sp1,p1_p1sp2,p1_p1sp3,p1_p1sp4,p1_p1sp5,p1_p1sp6,p1_p1sp7,p1_p1sp8,p1_p1sp9,p1_p1sp10,p1_p1sp11,p1_p1sp12,p1_p1sp13,p1_p1sp14,p1_p1sp15,p1_p1sp16,p1_p1sp17,p1_p1sp18,p1_p1sp19,p1_p1sp20,p1_p1sp21,p1_p1sp22,p1_p1sp23,p1_p1sp24,p1_p1sp25,p1_p1sp26,p1_p1sp27,p1_p1sp28,p1_p1sp29
         type: index_merge
possible_keys: friend_index,requestor,contact
          key: friend_index,contact
      key_len: 17,17
          ref: NULL
         rows: 60
        Extra: Using sort_union(friend_index,contact); Using where; Using filesort
1 row in set (0.01 sec)

What does the "rows" mean? less rows is more faster query?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The MySQL Reference Manual says:

As of MySQL 5.1.28, the rows column of EXPLAIN PARTITIONS output always displays the total number of records in the table. Previously, this was the number of matching rows. (Bug#35745)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.