| From: | Joerg Hessdoerfer <Joerg(dot)Hessdoerfer(at)sea-gmbh(dot)com> |
|---|---|
| To: | Crispin Miller <crispin(at)cs(dot)man(dot)ac(dot)uk> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Not using index |
| Date: | 2001-02-07 15:32:55 |
| Message-ID: | 5.0.2.1.0.20010207162844.00a84970@192.168.0.1 |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
At 14:47 07.02.01 +0000, you wrote:
>Hi,
>I have a table with about 8million tuples in it. I need to do a search
>on two of the table's columns, so I've created a couple of indices, one
>for each column.
>Then I've run VACUUM ANALYZE. The query planner still wants to do a
>sequential scan on the database. Any idea where I'm going wrong?
>Crispin
For this, you need to create an index on BOTH columns, e.g.
'create index foo on bar ( baz, bang )'
That should help.
Greetings,
Joerg
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Gunnar R|nning | 2001-02-07 15:39:32 | Re: full text searching |
| Previous Message | Brice Ruth | 2001-02-07 15:26:23 | Re: [SQL] Re: SQL Join - MySQL/PostgreSQL difference? |