Re: [PERFORM] Use of subquery causes seq scan???

2004-04-20 Thread Bruno Wolff III
Please don't reply to messages to start new threads. On Tue, Apr 20, 2004 at 10:20:05 -0400, Chris Hoover <[EMAIL PROTECTED]> wrote: > I need some help. I have a query that refuses to use the provided index and > is always sequentially scanning causing me large performance headaches. Here >

Re: [PERFORM] Use of subquery causes seq scan???

2004-04-20 Thread Tom Lane
"Chris Hoover" <[EMAIL PROTECTED]> writes: > Select * > from table a > where inv_num in (select inv_num from table b where ) > I'm running 7.3.4 on RedHat EL 2.1. IN (SELECT) constructs pretty well suck in PG releases before 7.4. Update, or consult the FAQ about rewriting into an EXISTS form.

[PERFORM] Use of subquery causes seq scan???

2004-04-20 Thread Chris Hoover
I need some help. I have a query that refuses to use the provided index and is always sequentially scanning causing me large performance headaches. Here is the basic situation: Table A: inv_num int typechar . . . pkey (inv_num, type) indx(inv_num) Table B (has the same primary key