Re: [SQL] Sequential scan where Index scan expected.

2006-03-04 Thread Nikolay Samokhvalov
please, show '\d xx_thing_event' too :-) On 3/3/06, Bryce Nesbitt <[EMAIL PROTECTED]> wrote: > I'm getting sequential scans (and poor performance), on scans using my > primary keys. > Can anyone help figure out why? > > demo=# \d xx_thing > Table "public.xx_thing" > C

Re: [SQL] Sequential scan where Index scan expected (update)

2006-03-03 Thread Andrew Sullivan
On Fri, Mar 03, 2006 at 11:35:55AM -0800, Bryce Nesbitt wrote: > Yup that's it. But this project uses (ugh) Hibernate. I can't change > it. I may have to change > from BIGINT primary keys to INT. > Well, you could upgrade from 7.4. > Also: > Any hints on the table statistics? I turn them o

Re: [SQL] Sequential scan where Index scan expected (update)

2006-03-03 Thread Bryce Nesbitt
Andrew Sullivan wrote: thing_event_id=1; ^ in quotes. The automatic int4-int8 coercion is probably your problem. Also Yup that's it.  But this project uses (ugh) Hibernate.  I can't change it.  I may have to change from BIGINT primary keys to IN

Re: [SQL] Sequential scan where Index scan expected (update)

2006-03-03 Thread Andrew Sullivan
On Thu, Mar 02, 2006 at 11:28:49PM -0800, Bryce Nesbitt wrote: > Can anyone help figure out why? Well. . . > > > demo=# \d xx_thing > -+-+--- > thing_id | bigint | not null

Re: [SQL] Sequential scan where Index scan expected (update)

2006-03-03 Thread Michael Fuhr
On Thu, Mar 02, 2006 at 11:37:53PM -0800, Gregory S. Williamson wrote: > It seems unlikely but maybe try an explict cast for the thing_id call, e.g. > explain update xx_thing_event set thing_color='foo' where > thing_event_id=1::bigint; The server is pre-8.0 so it's likely that this is indeed

Re: [SQL] Sequential scan where Index scan expected (update)

2006-03-03 Thread Ragnar
On fim, 2006-03-02 at 23:28 -0800, Bryce Nesbitt wrote: > I'm getting sequential scans (and poor performance), on scans using my > primary keys. This is an older postgres. > Can anyone help figure out why? > > > demo=# \d xx_thing > Table "public.xx_thing" > Column

Re: [SQL] Sequential scan where Index scan expected (update)

2006-03-02 Thread Gregory S. Williamson
Subject: [SQL] Sequential scan where Index scan expected (update) I'm getting sequential scans (and poor performance), on scans using my primary keys. This is an older postgres. Can anyone help figure out why? demo=# \d xx_thing Table "public.xx_th

[SQL] Sequential scan where Index scan expected (update)

2006-03-02 Thread Bryce Nesbitt
I'm getting sequential scans (and poor performance), on scans using my primary keys. This is an older postgres. Can anyone help figure out why? demo=# \d xx_thing Table "public.xx_thing" Column |Type | Modifiers -

[SQL] Sequential scan where Index scan expected.

2006-03-02 Thread Bryce Nesbitt
I'm getting sequential scans (and poor performance), on scans using my primary keys. Can anyone help figure out why? demo=# \d xx_thing Table "public.xx_thing" Column |Type | Modifiers -+