Re: 2 machines, same database, same query, 10 times slower?
| От | Antonio Goméz Soto |
|---|---|
| Тема | Re: 2 machines, same database, same query, 10 times slower? |
| Дата | |
| Msg-id | 4FAAD89F.1030604@gmail.com обсуждение исходный текст |
| Ответ на | Re: 2 machines, same database, same query, 10 times slower? (Tomas Vondra <tv@fuzzy.cz>) |
| Ответы |
Re: 2 machines, same database, same query, 10 times slower?
|
| Список | pgsql-general |
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. >
В списке pgsql-general по дате отправления: