Re: [SQL] function based index problem

2011-08-31 Thread Viktor Bojović
sql.org > *Subject:* [SQL] function based index problem > > ** ** > > Hi, > on table entry (17M records) there is one index: > > CREATE INDEX ndxlen > ON uniprot_frekvencije.entry > USING btree > (length(sequence::text)); > > When using "

Re: [SQL] function based index problem

2011-08-31 Thread David Johnston
From: [email protected] [mailto:[email protected]] On Behalf Of Viktor Bojovic Sent: Wednesday, August 31, 2011 5:27 PM To: [email protected]; [email protected] Subject: [SQL] function based index problem Hi, on table entry (17M records) there is

[SQL] function based index problem

2011-08-31 Thread Viktor Bojović
Hi, on table entry (17M records) there is one index: CREATE INDEX ndxlen ON uniprot_frekvencije.entry USING btree (length(sequence::text)); When using ">=" in search which returns only two records, query runs much (hundred times) slower. i don't know why it doesn't use index scan. I just wa