weird indexing behavior in presense of limit

2001-05-23 Thread Andrey Gubarev
I have a very large table, where one of the columns is color enum("red", "blue", "black") The distribution of values is 90% black, 8% blue, and 2% red. I want to be able to randomly select 10 rows matching a certain color from the table. Of course, select * from my_table where color = "bl

weird indexing behavior in presense of LIMIT

2001-04-19 Thread Andrey Gubarev
I have a very large table, where one of the columns is color enum("red", "blue", "black") The distribution of values is 90% black, 8% blue, and 2% red. I want to be able to randomly select 10 rows matching a certain color from the table. Of course, select * from my_table where color