MySQL Forums
Forum List  »  General

Re: oralce partial range scan
Posted by: irek kordirko
Date: February 16, 2012 11:10AM

Range scan .... do you mean this?

mysql> create table xxx( x int primary key auto_increment, val varchar(100));
Query OK, 0 rows affected (0.10 sec)

mysql> insert into xxx( val ) select column_name from information_schema.columns;
Query OK, 939 rows affected (0.24 sec)
Records: 939  Duplicates: 0  Warnings: 0

mysql> explain extended select * from xxx where x between 400 and 600;
+----+-------------+-------+-------+---------------+---------+---------+------+------+----------+-----------------------+
| id | select_type | table | type  | possible_keys | key     | key_len | ref  | rows | filtered | Extra                 |
+----+-------------+-------+-------+---------------+---------+---------+------+------+----------+-----------------------+
|  1 | SIMPLE      | xxx   | range | PRIMARY       | PRIMARY | 4       | NULL |  201 |   100.00 | Using index condition |
+----+-------------+-------+-------+---------------+---------+---------+------+------+----------+-----------------------+
1 row in set, 1 warning (0.00 sec)


Options: ReplyQuote


Subject
Written By
Posted
February 15, 2012 10:19PM
Re: oralce partial range scan
February 16, 2012 11:10AM
February 16, 2012 10:13PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.