From: sathiya psql <sathiya.psql@gmail.com>
To: Uwe C. Schroeder <uwe@oss4u.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: postgresql is slow with larger table even it is in RAM
Date: Tue, 25 Mar 2008 14:20:30 +0530
Message-ID: <f966c2ee0803250150p3b3cf68bn32fd044ecf783624@mail.gmail.com> (raw)
In-Reply-To: <200803250142.14715.uwe@oss4u.com>
References: <f966c2ee0803250136j2b44a10j4fb54afbee3ed8ed@mail.gmail.com>
<200803250142.14715.uwe@oss4u.com>
>
> I can't really say anything about your RAM issue, but count(*) is always a
> bad
> idea if it can be avoided. Assuming you have a primary key on the table,
> do a
> count(pk). In my experience that alone cuts down up to 30% of execution
> time.
>
> i want exact count so am doing this...
But as you are saying it is not doing so,
at first without primary key i had a column "id", it took the same 3 seconds
to show the count, after reading some tips i created primary key on that
"id", and i did select count(id) from table, and now also it is taking the
same 3 seconds.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: sathiya.psql@gmail.com, uwe@oss4u.com
Subject: Re: postgresql is slow with larger table even it is in RAM
In-Reply-To: <f966c2ee0803250150p3b3cf68bn32fd044ecf783624@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox