Jump to content

jeroman

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jeroman's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello everyone, Let us assume we have a table create table T (id int unsigned primary key auto_increment, php int); create index i_php on T(php); Now let us insert 2 million rows into this table with php being numbers from 1 to 5. Thus we have just 5 distinct values. And now the problem: when I execute one of the following select distinct php from T or select php from T group by php it takes about 2 - 3 secs on my system to return the 5 indexed values but it must have taken just fractions of a second to lookup index and return 5 values. Where is the problem? Can anyone share his/her knowledge of how to make it read directly the indexed values? Any comments are welcome. Thanx
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.