Similar tables, different indexes performance

Поиск
Список
Период
Сортировка
Искать

Similar tables, different indexes performance

От:
Alvaro Nunes Melo <al_nunes@atua.com.br>
Дата:
Вложения:
Hi,

I know that it's not very polite thing re-send a question, but I don't
have any idea about why can this be happening. I have two almost
identical tables, with equivalent indexes, but their performances are
very different. In this case, I'm sending the queries, explains,
tables'structures and record counts. I think this is the place where I
can most probably get help about performance issues.

Thanks in advance,

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

Re: Similar tables, different indexes performance

От:
Bruno Wolff III <bruno@wolff.to>
Дата:
On Mon, Dec 13, 2004 at 15:17:49 -0200, Alvaro Nunes Melo  wrote:
> db=> SELECT COUNT(*) FROM titulo WHERE cd_pessoa = 1;
>  count 
> -------
>    220
> (1 record)
> 
> Time: 48,762 ms
> db=> SELECT COUNT(*) FROM movimento WHERE cd_pessoa = 1;
>  count 
> -------
>    221
> (1 record)
> 
> Time: 1158,463 ms

I suspect you have a lot of dead tuples in those tables.
Have you vacuumed them recently?
Was there enough FSM space when you did so?

You might try doing VACUUM FULL on each table now and see if that
fixes the problem.

FAQ