On Tue, 19 Aug 2003, Chris Miles wrote: > I have a DB that appears to perform badly. A test of one table > with one of the typical queries gives me a query plan indicating > a Seq Scan; > > DB=# EXPLAIN select pcref,pcseqnbr from catrecrel where > pcbsref='something' and (pccaref is null or pccaref='') and pcpar is > null order by pcseqnbr ; > NOTICE: QUERY PLAN: > > Sort (cost=38266.65..38266.65 rows=4 width=58) > -> Seq Scan on catrecrel (cost=0.00..38266.61 rows=4 width=58)
What does it give if you set enable_seqscan=off; before the explain? And what does explain analyze give both with seqscan disabled and enabled? Also, what version are you running? ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match