Re: [PERFORM] Less rows -> better performance?

2008-07-22 Thread Łukasz Filut
[...] You can check this too: select relname, relpages, reltuples, relkind from pg_class where relkind in ('r', 'i') order by relpages desc limit 20; Will give you the top-20 tables and their sizes, 1 page is typically 8KB, so you can cross-check if relpages/reltuples is completly off, this i

Re: [PERFORM] Less rows -> better performance?

2008-07-21 Thread Mario Weilguni
Andreas Hartmann schrieb: Mario Weilguni schrieb: Andreas Hartmann schrieb: […] I just verified that the autovacuum property is enabled. […] Did you have: stats_start_collector = on stats_block_level = on stats_row_level = on Otherwise autovacuum won't run IMO. Thanks for the hint! Th

Re: [PERFORM] Less rows -> better performance?

2008-07-21 Thread Andreas Hartmann
Mario Weilguni schrieb: Andreas Hartmann schrieb: […] I just verified that the autovacuum property is enabled. […] Did you have: stats_start_collector = on stats_block_level = on stats_row_level = on Otherwise autovacuum won't run IMO. Thanks for the hint! The section looks like this:

Re: [PERFORM] Less rows -> better performance?

2008-07-21 Thread Harald Armin Massa
Andreas, > I just verified that the autovacuum property is enabled. I did the following > to prepare the tests: "autovacuum property is enabled" Did you also check the logs, if autovacuum is working? > - setup two test databases, let's call them db_all and db_current > - import the dump from the

Re: [PERFORM] Less rows -> better performance?

2008-07-21 Thread Andreas Hartmann
Guillaume Smet schrieb: On Mon, Jul 21, 2008 at 1:25 PM, Andreas Hartmann <[EMAIL PROTECTED]> wrote: SELECT pg_database.datname, pg_size_pretty(pg_database_size(pg_database.datname)) AS size FROM pg_database where pg_database.datname = 'vvz_live_1'; datname| size ---+---

Re: [PERFORM] Less rows -> better performance?

2008-07-21 Thread Christian GRANDIN
Hi, Reducing the amount of data will only have effect on table scan or index scan. If your queries are selective and optimized, it will have no effect. Before looking for solutions, the first thing to do is to understand what's happen. If you already know the queries then explain them. Otherwise

Re: [PERFORM] Less rows -> better performance?

2008-07-21 Thread Craig Ringer
Guillaume Smet wrote: On Mon, Jul 21, 2008 at 1:25 PM, Andreas Hartmann <[EMAIL PROTECTED]> wrote: SELECT pg_database.datname, pg_size_pretty(pg_database_size(pg_database.datname)) AS size FROM pg_database where pg_database.datname = 'vvz_live_1'; datname| size ---+-

Re: [PERFORM] Less rows -> better performance?

2008-07-21 Thread Richard Huxton
Andreas Hartmann wrote: Here's some info about the actual amount of data: SELECT pg_database.datname, pg_size_pretty(pg_database_size(pg_database.datname)) AS size FROM pg_database where pg_database.datname = 'vvz_live_1'; datname| size ---+- vvz_live_1| 2565

Re: [PERFORM] Less rows -> better performance?

2008-07-21 Thread Guillaume Smet
On Mon, Jul 21, 2008 at 1:25 PM, Andreas Hartmann <[EMAIL PROTECTED]> wrote: > SELECT pg_database.datname, > pg_size_pretty(pg_database_size(pg_database.datname)) AS size > FROM pg_database where pg_database.datname = 'vvz_live_1'; > >datname| size > ---+- > vvz_live_1

Re: [PERFORM] Less rows -> better performance?

2008-07-21 Thread Andreas Hartmann
Richard, thanks for your reply! Richard Huxton schrieb: Andreas Hartmann wrote: Dear PostgreSQL community, first some info about our application: - Online course directory for a University - Amount of data: complete dump is 27 MB - Semester is part of primary key in each table - Data for appr

Re: [PERFORM] Less rows -> better performance?

2008-07-21 Thread Richard Huxton
Andreas Hartmann wrote: Dear PostgreSQL community, first some info about our application: - Online course directory for a University - Amount of data: complete dump is 27 MB - Semester is part of primary key in each table - Data for approx. 10 semesters stored in the DB - Read-only access from

[PERFORM] Less rows -> better performance?

2008-07-21 Thread Andreas Hartmann
Dear PostgreSQL community, first some info about our application: - Online course directory for a University - Amount of data: complete dump is 27 MB - Semester is part of primary key in each table - Data for approx. 10 semesters stored in the DB - Read-only access from web application (JDBC) O