Re: [GENERAL] Baffled by failure to use index when WHERE uses a function

2006-03-10 Thread Hongxi.Ma
if ur function 'healpix' marked 'VOLATILE ' , it meas 'passed the same params may result to diffrennt result', so , database have to compare the value row by row (db does not know what u actully mean) - Original Message - From: "Clive Page" <[EMAIL PROTECTED]> To: Sent: Friday, March 10,

Re: [GENERAL] Baffled by failure to use index when WHERE uses a function

2006-03-10 Thread Richard Huxton
Clive Page wrote: I have a table cov3 of about 3 million rows, with a B-tree index on an integer column called hpix. If I do a simple select on this column it works in milliseconds, using the index naturally: select * from cov3 where hpixint = 482787587; hpix| expos | hpixint --

Re: [GENERAL] Baffled by failure to use index when WHERE uses a function

2006-03-10 Thread Michael Fuhr
On Fri, Mar 10, 2006 at 09:14:27AM +, Clive Page wrote: > I have a table cov3 of about 3 million rows, with a B-tree index on an > integer column called hpix. If I do a simple select on this column it > works in milliseconds, using the index naturally: > > select * from cov3 where hpixint =

Re: [GENERAL] Baffled by failure to use index when WHERE uses a function

2006-03-10 Thread Martijn van Oosterhout
On Fri, Mar 10, 2006 at 09:14:27AM +, Clive Page wrote: > I have a table cov3 of about 3 million rows, with a B-tree index on an > integer column called hpix. If I do a simple select on this column it > works in milliseconds, using the index naturally: > So I would like to use this functi