Re: [GENERAL] Query help

2007-03-07 Thread Shaun Johnston
Try SELECT DISTINCT rather than SELECT That should return a result with unique records. Madison Kelly wrote: Hi all, I've got a query that looks through a table I use for my little search engine. It's something of a reverse-index but not quite, where a proper reverse index would have

Re: [GENERAL] Assistance with Query Optimisation?

2007-03-01 Thread Shaun Johnston
Isak Hansen wrote: First thing I notice is that your query plans seem to only use one index. Postgres should be able to combine the timestamp and account_id indexes in that first query, if the optimizer thought there was a point in doing so? Absolutely brilliant - this solved my issue,

[GENERAL] Assistance with Query Optimisation?

2007-02-28 Thread Shaun Johnston
this optimisation peculiarity be due to the combination of indexed columns in the query? Also, Is there a way I can 'force' the planner to perform an 'index scan - sort - limit' or even better an 'index scan - limit - sort'? Any pointers / assistance appreciated. Kind Regards, Shaun Johnston