David Griffiths wrote:
> Yes, the query operates only on indexed columns (all numeric(10)'s).
>
> Column | Type |
> Modifiers
> -------------------------------+-----------------------------+--------------
> ---------------
> user_account_id | numeric(10,0) | not null
> [snip]
> Indexes: user_account_pkey primary key btree (user_account_id),
> Foreign Key constraints: $1 FOREIGN KEY (lang_id) REFERENCES lang(lang_id)
> ON UPDATE NO ACTION ON DELETE NO ACTION,
> $2 FOREIGN KEY (source_id) REFERENCES
> source(source_id) ON UPDATE NO ACTION ON DELETE NO ACTION,
> $3 FOREIGN KEY (user_role_id) REFERENCES
> user_role(user_role_id) ON UPDATE NO ACTION ON DELETE NO ACTION
And what about commercial_entity.user_account_id. Is it indexed and what
is its data type (i.e. does it match numeric(10,0))?
Also, have you run VACUUM ANALYZE lately?
Joe