Re: [HACKERS] I feel the need for speed. What am I doing wrong?

2003-01-06 Thread Tom Lane
Dann Corbit [EMAIL PROTECTED] writes: Creating the following index had no effect on performance! create unique index i1 on CNX_DS2_53_SIS_STU_OPT_FEE_TB (RT_REC_KEY, cnxarraycolumn, CRC); What does EXPLAIN ANALYZE have to say about the query? If you set enable_seqscan = 0, does the explain

Re: [HACKERS] I feel the need for speed. What am I doing wrong?

2003-01-06 Thread Nigel J. Andrews
Added -general list so that the next followup can remove -hackers and everyone there will have had notice. On Mon, 6 Jan 2003, Dann Corbit wrote: I have a query using two postgres tables. One is called CNX_DS_53_SIS_STU_OPT_FEE_TB and the other is called CNX_DS2_53_SIS_STU_OPT_FEE_TB.

Re: [HACKERS] I feel the need for speed. What am I doing wrong?

2003-01-06 Thread Dann Corbit
-Original Message- From: Nigel J. Andrews [mailto:[EMAIL PROTECTED]] Sent: Monday, January 06, 2003 4:58 PM To: Dann Corbit Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [HACKERS] I feel the need for speed. What am I doing wrong? Added -general list so that the next

Re: [HACKERS] I feel the need for speed. What am I doing wrong?

2003-01-06 Thread Tom Lane
Nigel J. Andrews [EMAIL PROTECTED] writes: select a.RT_REC_KEY, a.cnxarraycolumn, a.CRC from CNX_DS_53_SIS_STU_OPT_FEE_TB a left outer join CNX_DS2_53_SIS_STU_OPT_FEE_TB b on ( a.RT_REC_KEY = b.RT_REC_KEY and a.cnxarraycolumn = b.cnxarraycolumn) where b.oid is null ; I suspect you get no

Re: [HACKERS] I feel the need for speed. What am I doing wrong?

2003-01-06 Thread Dann Corbit
-Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED]] Sent: Monday, January 06, 2003 5:26 PM To: Nigel J. Andrews Cc: Dann Corbit; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [HACKERS] I feel the need for speed. What am I doing wrong? Nigel J. Andrews [EMAIL

Re: [HACKERS] I feel the need for speed. What am I doing wrong?

2003-01-06 Thread Tom Lane
Dann Corbit [EMAIL PROTECTED] writes: Yikes! Five times slower! But then I took Tom's incredibly helpful suggestion to disable the sequential scan: Ideally, you shouldn't have to do that. Now that you have the correct indexes in place, could you show us the EXPLAIN ANALYZE output for both