Very different index usage on similar tables - Mailing list pgsql-performance

From Alvaro Nunes Melo
Subject Very different index usage on similar tables
Date
Msg-id 1102784484.4166.8.camel@localhost
Whole thread Raw
List pgsql-performance
Hi,

I have two similar tables in a database, one stores persons and the
other stores telephones. They have a similar number of records (around
70.000), but a indexed search on the persons' table is way faster than
in the telephones' table. I'm sending the explains atacched, and I
believe that the problem can be in the fact the the explain extimates a
worng number of rows in the telefones' explain. I'm sending the explains
atacched, and the table and columns' names are in Portuguese, but if it
makes easier for you guys I can translate them in my next posts.

The in dex in the telephone table is multicolumn, I'd tried to drop it
and create a single-column index, but the results were quite the same.

Thanks,

--
+---------------------------------------------------+
|  Alvaro Nunes Melo    Atua Sistemas de Informacao |
| al_nunes@atua.com.br        www.atua.com.br       |
|    UIN - 42722678            (54) 327-1044        |
+---------------------------------------------------+

Attachment

pgsql-performance by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: [GENERAL] Query is not using index when it should
Next
From: Tom Lane
Date:
Subject: Re: LIMIT causes SEQSCAN in subselect