Skip site navigation (1) Skip section navigation (2)

Re: Table access method not behaving like Oracle (index vs sequential

From: Daniel Schuchardt <daniel_schuchardt(at)web(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Table access method not behaving like Oracle (index vs sequential
Date: 2004-07-22 09:40:30
Message-ID: cdo1qu$20dm$1@news.hub.org (view raw or flat)
Thread:
Lists: pgsql-general
Kevin Macdonald wrote:

> 
> QUERY 2: select sobjid from p1_nrn_road where v = 1
> 
> The plan is "Seq Scan on p1_nrn_road (cost=0.00..22158.54 rows=2 width=8)"
> 
> The plan is wrong: "select min(v) from p1_nrn_road" returns
> 2226497481090365991, which indicates that the query will return 0 rows.
> 


Hy Kevin,

please try

select sobjid from p1_nrn_road where v = '1'

(notice quotes)

I'm not sure but i think indexes that consists of more than 2 rows have 
to be casted to char in PG.

Daniel.

In response to

pgsql-general by date

Next:From: Oleg BartunovDate: 2004-07-22 09:58:38
Subject: Re: [OpenFTS-general] AW: tsearch2, ispell, utf-8 and
Previous:From: Oleg BartunovDate: 2004-07-22 09:32:10
Subject: Re: Tsearch2 - list of words or phrase with count

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group