Re: Slow retrieval of distinct on indexed fields

2003-02-18 Thread Peter Grigor
ifieds http://www.hoobly.com - Original Message - From: "Dan Nelson" <[EMAIL PROTECTED]> To: "Peter Grigor" <[EMAIL PROTECTED]> Cc: "Renars Jeromans" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, February 18, 2003 11:12 AM Subject: Re: Slo

Re: Slow retrieval of distinct on indexed fields

2003-02-18 Thread Dan Nelson
In the last episode (Feb 18), Peter Grigor said: > I've always thought that adding a count of index entries to the index > file would be helpful. > > Like (generic index entry): word:15:1,2,5,7,etc... > > where word is the indexed value, 15 is the number of times it > appears, and 1,2,5,7 is the

Re: Slow retrieval of distinct on indexed fields [OT?]

2003-02-18 Thread Michael T. Babcock
Dan Nelson wrote: You need to walk the entire index to make sure you have all the values. There might be a single "AAB" inbetween those million "AAA"'s and million "BBB"'s. Another DBA and I once discussed that an index of index values would be helpful for such large searches as web search e

Re: Slow retrieval of distinct on indexed fields

2003-02-18 Thread Peter Grigor
Peter <^_^> - Peter Grigor Hoobly Free Classifieds http://www.hoobly.com - Original Message - From: "Dan Nelson" <[EMAIL PROTECTED]> To: "Renars Jeromans" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, February 18, 2003 10

Re: Slow retrieval of distinct on indexed fields

2003-02-18 Thread Dan Nelson
In the last episode (Feb 18), Renars Jeromans said: > This is not an urgent problem, but it has always intrigued me... It's > simplified case, but it makes the point. Let us assume that we have a > table > > create table T (id unsigned int unique, name char(10)); > create index i_name on T(name);

Slow retrieval of distinct on indexed fields

2003-02-18 Thread Renars Jeromans
Hello, This is not an urgent problem, but it has always intrigued me... It's simplified case, but it makes the point. Let us assume that we have a table create table T (id unsigned int unique, name char(10)); create index i_name on T(name); Let's insert into it say 5 mil rows with name field be