Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 72C622E002D for ; Tue, 25 Mar 2008 05:50:07 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 60903-03 for ; Tue, 25 Mar 2008 05:49:57 -0300 (ADT) X-Greylist: delayed 00:08:03.56127 by SQLgrey-1.7.5 Received: from mostly.harmless.hu (mostly.harmless.hu [195.56.55.205]) by postgresql.org (Postfix) with ESMTP id 857312E003C for ; Tue, 25 Mar 2008 05:50:01 -0300 (ADT) Received: from fw.publishing.hu ([82.131.181.62] helo=twoflower.in.publishing.hu) by mostly.harmless.hu with esmtpa (Exim 4.69 (FreeBSD)) (envelope-from ) id 1Je4jC-000AqF-MK; Tue, 25 Mar 2008 09:41:54 +0100 Date: Tue, 25 Mar 2008 09:41:47 +0100 From: CZUCZY Gergely To: "sathiya psql" Cc: pgsql-admin@postgresql.org Subject: Re: postgresql is slow with larger table even it is in RAM Message-ID: <20080325094147.40317ea2@twoflower.in.publishing.hu> In-Reply-To: References: Organization: Harmless Digital X-Mailer: Claws Mail 3.3.1 (GTK+ 2.10.11; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/OTDSqyRM1S3uiiTu4Z2L3Kp"; protocol="application/pgp-signature"; micalg=PGP-SHA1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200803/226 X-Sequence-Number: 28709 --Sig_/OTDSqyRM1S3uiiTu4Z2L3Kp Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable May I ask, do you have any indeces or a primary key on that table? On Tue, 25 Mar 2008 14:06:25 +0530 "sathiya psql" wrote: > Dear Friends, > I have a table with 32 lakh record in it. Table size is nearly 700 M= B, > and my machine had a 1 GB + 256 MB RAM, i had created the table space in > RAM, and then created this table in this RAM. >=20 > So now everything is in RAM, if i do a count(*) on this table it retu= rns > 327600 in 3 seconds, why it is taking 3 seconds ????? because am sure that > no Disk I/O is happening. ( using vmstat i had confirmed, no disk I/O is > happening, swap is also not used ) >=20 > Any Idea on this ??? >=20 > I searched a lot in newsgroups ... can't find relevant things.... ( becau= se > everywhere they are speaking about disk access speed, here i don't want to > worry about disk access ) >=20 > If required i will give more information on this. --=20 =C3=9Cdv=C3=B6lettel, Czuczy Gergely Harmless Digital Bt mailto: gergely.czuczy@harmless.hu Tel: +36-30-9702963 --Sig_/OTDSqyRM1S3uiiTu4Z2L3Kp Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.3 (FreeBSD) iD8DBQFH6LrRzrC0WyuMkpsRAnUJAJ97q/FRdDucdJ6N5T+5vuukwgowtACeNgB9 Qbi7Phtoepdv3+cMK+4+24k= =IndS -----END PGP SIGNATURE----- --Sig_/OTDSqyRM1S3uiiTu4Z2L3Kp--