Skip site navigation (1) Skip section navigation (2)

Very different index usage on similar tables

From: Alvaro Nunes Melo <al_nunes(at)atua(dot)com(dot)br>
To: Pgsql-Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Very different index usage on similar tables
Date: 2004-12-11 17:01:24
Message-ID: 1102784484.4166.8.camel@localhost (view raw, whole thread or download thread mbox)
Lists: pgsql-performance

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.


|  Alvaro Nunes Melo    Atua Sistemas de Informacao |
| al_nunes(at)atua(dot)com(dot)br       |
|    UIN - 42722678            (54) 327-1044        |

Attachment: explains
Description: text/plain (3.0 KB)

pgsql-performance by date

Next:From: Tom LaneDate: 2004-12-11 18:06:23
Subject: Re: LIMIT causes SEQSCAN in subselect
Previous:From: Michael FuhrDate: 2004-12-11 16:25:39
Subject: Re: [GENERAL] Query is not using index when it should

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group