Re: [PERFORM] Planner wrongly shuns multi-column index for select .. order by col1, col2 limit 1

2011-03-14 Thread John Surcombe
> >> When we 'EXPLAIN' this query, PostgreSQL says it is using the index > >> idx_receiveddatetime. The way the application is designed means that > >> in virtually all cases the query will have to scan a very long way > >> into idx_receiveddatetime to find the first record where userid = > 311369

[PERFORM] Planner wrongly shuns multi-column index for select .. order by col1, col2 limit 1

2011-03-13 Thread John Surcombe
Hello, We are using PostgreSQL 9.0.3, compiled by Visual C++ build 1500, 32-bit, installed on Windows 2003 R2 32-bit. We have an 'aisposition' table used for a GPS tracking application, containing ~30 million rows and a number of indexes. Two of these are: idx_receiveddatetime: indexes