Re: Crappy performance even though not swapping
От | Neil Aggarwal |
---|---|
Тема | Re: Crappy performance even though not swapping |
Дата | |
Msg-id | 000f01c75ae6$6c3159e0$0501a8c0@neilhp обсуждение исходный текст |
Ответ на | Crappy performance even though not swapping ("Neil Aggarwal" <neil@JAMMConsulting.com>) |
Ответы |
Re: Crappy performance even though not swapping
|
Список | pgsql-novice |
Hello all: I read the performance tips section of the documentation and tried removing an index I had on the table. Once I did that, the performance seems to keep to the level when my program first runs. Here is my table: CREATE TABLE "exemptions" ( acct_num varchar(13) not null, tax_district char(3), exemption_code char(3), exemption_description varchar(50) ); I had this index on it: CREATE INDEX "exemptions_acct_num" on "exemptions" ("acct_num"); I can't create a unique index since there are repeat rows for the account number when it has a different exemption code. I am completely surprised by how much performance degredation occurs with the index vs. without it. Do unique indexes also have such a large impact on insert performance? Will a non-unique index such as defined above help much with queries or will the improvement be negligible? Is there a better type of index to use? The queries against this table will almost always be looking to retrieve a set of rows by account number. Thanks, Neil -- Neil Aggarwal, (214)986-3533, www.JAMMConsulting.com FREE! Eliminate junk email and reclaim your inbox. Visit http://www.spammilter.com for details. -----Original Message----- From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Neil Aggarwal Sent: Tuesday, February 27, 2007 8:50 PM To: pgsql-novice@postgresql.org Subject: [NOVICE] Crappy performance even though not swapping Hello: I have a Java program that is trying to import over 8 million rows from a text file. When the program starts up, it runs fine, but after a while it begins to crawl. This is usually symptomatic of a machine that started swapping, but take a look at the attached output from top. I am using a LOT of memory, but the swap is still very low. I don't think the machine should be paging to disk. The CPU states show that the cpus are spending most of their time in an idle state. The process list shows the postmaster and java processes are less than 10 percent the CPU cycles. Having said that, the load average is still about 2. Any ideas what could be going on? Thanks, Neil -- Neil Aggarwal, (214)986-3533, www.JAMMConsulting.com FREE! Eliminate junk email and reclaim your inbox. Visit http://www.spammilter.com for details.
В списке pgsql-novice по дате отправления: