Search Postgresql Archives

Re: 2 machines, same database, same query, 10 times slower?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tomas,

running vacuum full cdr brought down the query time to 4 seconds..

Thanks a lot,
Antonio


Op 08-05-12 21:15, Tomas Vondra schreef:
> On 8.5.2012 20:32, Antonio Goméz Soto wrote:
>>>> Do this on both machines to verify that
>>>>
>>>>    SELECT relpages, reltuples FROM pg_class WHERE relname = 'cdr';
>> Slow machine:
>>
>>  relpages | reltuples
>> ----------+-----------
>>    400566 |    982321
>>
>> Fast machine:
>>
>>  relpages |  reltuples
>> ----------+-------------
>>     62076 | 1.48375e+06
>>
>>
> 
> Yup, that's probably the culprit. The slow machine has to read 400000
> pages while the fast one just 62000. Each page is 8kB, so this is 3GB
> vs. 500MB difference.
> 
> T.
> 


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux