On Wednesday 23. May 2007 16:31, Leif B. Kristensen wrote:
>I've also tried:
>
>pgslekt=> create index last_edit_key on persons(last_edit);
>
>But that doesn't make any difference.
But this one did:
pgslekt=> create index last_edited_persons_key on
persons(last_edit,person_id);
CREATE INDEX
pgsl
"Leif B. Kristensen" <[EMAIL PROTECTED]> writes:
> Can anybody tell me why the following query requires a full table scan?
> pgslekt=> explain select person_id, last_edit from persons
>order by last_edit desc, person_id desc limit 50;
> 'persons' is a regular table where person_id
Can anybody tell me why the following query requires a full table scan?
pgslekt=> explain select person_id, last_edit from persons
order by last_edit desc, person_id desc limit 50;
QUERY PLAN