"Kevin Macdonald" <nospam(at)please(dot)thankyou> writes:
> 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)"
Incidentally, you should send the whole plan. In general you should send all
the information you have, not just the parts you think are relevant. The next
line would have clearly shown the problem to someone who knew what to look
where v = '1'
where v = 1::bigint
The problem is that in 7.4 and previous indexes can't be used for cross-type
comparisons and integer constants are assumed to be integer not bigint type.
If you leave it in quotes then postgres doesn't pick a type until it looks at
what you're comparing it with. Or if you cast it then you force it to be a
7.5 will avoid this problem.
In response to
pgsql-general by date
|Next:||From: Doug McNaught||Date: 2004-07-29 16:07:42|
|Subject: Re: Question about linux filesystem and psql|
|Previous:||From: Jim Seymour||Date: 2004-07-29 15:56:21|
|Subject: Re: mirroring data on different drives?|