| From: | "Pierre C" <lists(at)peufeu(dot)com> |
|---|---|
| To: | "Josh Berkus" <josh(at)agliodbs(dot)com>, "Tobias Brox" <tobixen(at)gmail(dot)com> |
| Cc: | pgsql-performance(at)postgresql(dot)org, "Mladen Gogala" <mladen(dot)gogala(at)vmsinfo(dot)com> |
| Subject: | Re: Why we don't want hints Was: Slow count(*) again... |
| Date: | 2011-02-11 14:51:44 |
| Message-ID: | op.vqqt8ihaeorkce@apollo13 |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers pgsql-performance |
> select * from account_transaction where trans_type_id in ( ...
> long, hard-coded list ...) and account_id=? order by created desc
> limit 25;
You could use an index on (account_id, created, trans_type), in
replacement of your index on (account_id, created). This will not prevent
the "Index Scan Backwards", but at least, index rows with trans_type not
matching the WHERE clause will not generate any heap access...
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Stephen Frost | 2011-02-11 15:02:29 | Re: Add support for logging the current role |
| Previous Message | Robert Haas | 2011-02-11 14:13:15 | Re: ALTER EXTENSION UPGRADE, v3 |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jignesh Shah | 2011-02-11 17:04:59 | Re: High load, |
| Previous Message | Stephen Frost | 2011-02-11 13:35:51 | Re: [PERFORM] pgbench to the MAXINT |