The overall load of system is good. It is a vm but the other database is running normal and not doing much activity
vmstat 5 10
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 2 22048 296804 5016 10829360 0 0 1 3 0 0 5 1 75 18 1
9 1 22048 255184 5024 10868884 0 0 0 60 8955 10518 33 3 41 15 8
11 3 22048 197664 5024 10925944 0 0 0 0 7866 8767 37 2 44 12 6
12 1 22048 140000 5048 10976620 0 0 0 10 9181 10632 39 3 42 11 6
7 1 22048 148068 5076 10970104 0 0 1 33 7456 7715 34 2 46 8 10
11 3 22048 87408 5076 11027832 0 0 0 0 9846 12631 31 4 38 14 14
8 1 22048 48380 5084 11067456 0 0 0 35 7887 8902 33 3 43 11 10
vmstat 5 10
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 2 22048 296804 5016 10829360 0 0 1 3 0 0 5 1 75 18 1
9 1 22048 255184 5024 10868884 0 0 0 60 8955 10518 33 3 41 15 8
11 3 22048 197664 5024 10925944 0 0 0 0 7866 8767 37 2 44 12 6
12 1 22048 140000 5048 10976620 0 0 0 10 9181 10632 39 3 42 11 6
7 1 22048 148068 5076 10970104 0 0 1 33 7456 7715 34 2 46 8 10
11 3 22048 87408 5076 11027832 0 0 0 0 9846 12631 31 4 38 14 14
8 1 22048 48380 5084 11067456 0 0 0 35 7887 8902 33 3 43 11 10
On Thu, Jul 17, 2014 at 5:10 PM, John R Pierce <pierce@xxxxxxxxxxxx> wrote:
what does the overall workload on the system look like when this is so slow? taking over a minute to do 1820 iterations of a 3138 row index scan seems way out of bounds for anything other than a very heavily overloaded server.On 7/17/2014 5:01 PM, Prabhjot Sheena wrote:
i just did explain analyze and currently database is running slow coz of the query
explain ANALYZE SELECT account.id, account.organization_id, run.application_id, work_unit.script, work_unit.id, work_unit.start_time, run.id, work_unit.priority FROM work_unit, run, account WHERE work_unit.status = 3 AND work_unit.run_id = run.id AND work_unit.type != 1 AND run.status = 1 AND run.account_id = account.id;
is this running on a virtual machine where there are other virtual servers contending for the same resources ?
btw, here's your analyze formatted pretty: http://explain.depesz.com/s/XRI
-- john r pierce 37N 122W somewhere on the middle of the left coast