Re: [PERFORM] seq scan over 3.3 million rows instead of single key index access

2008-11-23 Thread A. Kretschmer
am Sun, dem 23.11.2008, um 6:20:08 +0200 mailte Andrus folgendes: > Gregory, > > > I would suggest running ANALYZE > >idtellUued at some point before the problematic query. > > Thank you. > After adding analyze all is OK. > Is analyze command required in 8.3 also ? Yes. Andreas -- Andreas

Re: [PERFORM] seq scan over 3.3 million rows instead of single key index access

2008-11-23 Thread Andreas Kretschmer
Andrus <[EMAIL PROTECTED]> schrieb: > There are indexes on rid(dokumnr) and dok(dokumnr) and dokumnr is int. > Instead of using single key index, 8.1.4 scans over whole rid table. > Sometimes idtelluued can contain more than single row so replacing join > with equality is not possible. > > How

Re: [PERFORM] seq scan over 3.3 million rows instead of single key index access

2008-11-23 Thread Andreas Kretschmer
Andrus <[EMAIL PROTECTED]> schrieb: > There are indexes on rid(dokumnr) and dok(dokumnr) and dokumnr is int. > Instead of using single key index, 8.1.4 scans over whole rid table. > Sometimes idtelluued can contain more than single row so replacing join > with equality is not possible. > > How

Re: [PERFORM] seq scan over 3.3 million rows instead of single key index access

2008-11-22 Thread Andrus
Gregory, I would suggest running ANALYZE idtellUued at some point before the problematic query. Thank you. After adding analyze all is OK. Is analyze command required in 8.3 also ? Or is it better better to specify some hint at create temp table time since I know the number of rows before r

Re: [PERFORM] seq scan over 3.3 million rows instead of single key index access

2008-11-22 Thread Tom Lane
Gregory Stark <[EMAIL PROTECTED]> writes: > "Andrus" <[EMAIL PROTECTED]> writes: >> There are indexes on rid(dokumnr) and dok(dokumnr) and dokumnr is int. >> Instead of using single key index, 8.1.4 scans over whole rid table. >> Sometimes idtelluued can contain more than single row so replacing

Re: [PERFORM] seq scan over 3.3 million rows instead of single key index access

2008-11-22 Thread Gregory Stark
"Andrus" <[EMAIL PROTECTED]> writes: > There are indexes on rid(dokumnr) and dok(dokumnr) and dokumnr is int. > Instead of using single key index, 8.1.4 scans over whole rid table. > Sometimes idtelluued can contain more than single row so replacing join with > equality is not possible. > > How