You probably need to run vacuum analyze after filling in the data.
Otherwise it's using bogus selectivity (see the number of expected
rows returned by the explain output, it's expecting 6000 rows after
the create index, which is large enough to make it guess that
it'll be cheaper to sequence scan the table.
In response to
pgsql-bugs by date
|Next:||From: Stephan Szabo||Date: 2001-08-29 18:36:21|
|Subject: Re: postmaster quits|
|Previous:||From: Stephan Szabo||Date: 2001-08-29 18:27:52|
|Subject: Re: Odp: PD: triggered data change violation on relation