[GENERAL] Slow queries when ORDER BY ... DESC with table inheritance (no index scan backwards)

2008-11-18 Thread DANG Trieu
Hi all, I'm a newbie to Postgres so please bear with me. I have a schema that uses inherited tables. I need the queries on my 'event' table to always be in descending order of the primary key, i.e. scan the index backwards (for obvious performance reasons). Somehow the ORDER BY doesn't seem to be

Re: [GENERAL] Slow queries when ORDER BY ... DESC with table inheritance (no index scan backwards)

2008-11-18 Thread DANG Trieu
Thank you Tomas for the reply. I'm including the requested information below. To sumarize my problem: The same query with "order by desc" on 2 tables (concrete and abstract). A backward PK index scan is used when run on the concrete table, but not when run on the abstract table. a) Was the table