Re: [GENERAL] Index use in BETWEEN statement...

2005-09-27 Thread Sean Davis
On 9/27/05 7:45 AM, "Yonatan Ben-Nes" <[EMAIL PROTECTED]> wrote: > Tom Lane wrote: >> "Cristian Prieto" <[EMAIL PROTECTED]> writes: >> >>> mydb=# explain analyze select locid from geoip_block where >>> '216.230.158.50'::inet between start_block and end_block; >> >> >>> As you see it still using

Re: [GENERAL] Index use in BETWEEN statement...

2005-09-27 Thread Yonatan Ben-Nes
Tom Lane wrote: "Cristian Prieto" <[EMAIL PROTECTED]> writes: mydb=# explain analyze select locid from geoip_block where '216.230.158.50'::inet between start_block and end_block; As you see it still using a sequential scan in the table and ignores the index, any other suggestion? That tw

Re: [GENERAL] Index use in BETWEEN statement...

2005-09-26 Thread Don Isgitt
Cristian Prieto wrote: mydb=# explain analyze select locid from geoip_block where '216.230.158.50'::inet between start_block and end_block; QUERY PLAN -

Re: [GENERAL] Index use in BETWEEN statement...

2005-09-26 Thread Tom Lane
"Cristian Prieto" <[EMAIL PROTECTED]> writes: > mydb=# explain analyze select locid from geoip_block where > '216.230.158.50'::inet between start_block and end_block; > As you see it still using a sequential scan in the table and ignores the > index, any other suggestion? That two-column index is

Re: [GENERAL] Index use in BETWEEN statement...

2005-09-26 Thread Cristian Prieto
g a sequential scan in the table and ignores the index, any other suggestion? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sean Davis Sent: Lunes, 26 de Septiembre de 2005 10:24 a.m. To: Cristian Prieto; pgsql-general@postgresql.org Subject: Re: [GENERAL]

Re: [GENERAL] Index use in BETWEEN statement...

2005-09-26 Thread Sean Davis
On 9/26/05 11:26 AM, "Cristian Prieto" <[EMAIL PROTECTED]> wrote: > > Hello pals, I have the following table in Postgresql 8.0.1 > > Mydb# \d geoip_block > Table "public.geoip_block" > Column| Type | Modifiers > -++--- > locid | bigint | > start_block | i

[GENERAL] Index use in BETWEEN statement...

2005-09-26 Thread Cristian Prieto
Hello pals, I have the following table in Postgresql 8.0.1 Mydb# \d geoip_block Table "public.geoip_block" Column| Type | Modifiers -++--- locid | bigint | start_block | inet | end_block | inet | mydb# explain analyze select locid from geoip_bl