pg.ddx.io pgsql-admin@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: petchimuthu lingam <spmlingam@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Indexing + performance
Date: Wed, 5 Mar 2008 15:27:26 +0530
Message-ID: <cd233fc30803050157w4e0a8b3x47b87c7e497d6ade@mail.gmail.com> (raw)
Dear Friends,
I have a table with 50 lakhs records, the table has more then 10
fields, i have primary key, i have select query with count(*) without any
condition, it takes 17 seconds.
I have another one query which will do joins with other small tables, it
takes 47 seconds to give output, the result has 2 lakhs records. the
indexing is not used. I have created one index with one field ( which i
used in this query, the field value has duplicates also ).
Now the cpu usage is 4.4%, and waiting for io process .
i have checked the above in the top command.
If i delete that index, then it works fine, now the cpu usage takes more
then 70%, and waiting shows less then 30%.
Can Anyone explain, Why postgres behaves like this.
Thanks....
--
With Best Regards,
Petchimuthulingam S
Message-ID: <cd233fc30803050157w4e0a8b3x47b87c7e497d6ade@mail.gmail.com> Permalink: ../cd233fc30803050157w4e0a8b3x47b87c7e497d6ade@mail.gmail.com/ Also on: postgresql.org/message-id/cd233fc30803050157w4e0a8b3x47b87c7e497d6ade@mail.gmail.com ·
reply
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: spmlingam@gmail.com Subject: Re: Indexing + performance In-Reply-To: <cd233fc30803050157w4e0a8b3x47b87c7e497d6ade@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