Slowly Queries

From: "Anton P(dot) Linevich" <lists-pgsql-admin(at)chexov(dot)kiev(dot)ua>
To: pgsql-admin(at)postgresql(dot)org
Subject: Slowly Queries
Date: 2006-12-14 01:06:56
Message-ID: 20061214010656.GA18647@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi guys. Can you give me a describe what should i do when get a lot of slowly queries?
Last week i saw such INFO messages in postgres log:

LOG: duration: 8144.361 ms statement: update videos set watched=watched+1, last_view_date='1166057431' where id='106980'
LOG: duration: 7825.637 ms statement: update videos set watched=watched+1, last_view_date='1166057431' where id='99337'
LOG: duration: 7023.592 ms statement: insert into statistics_search(date,search,type,id_member) VALUES ('1166057432','sexy','V','0')
LOG: duration: 6603.307 ms statement: insert into statistics_search(date,search,type,id_member) VALUES ('1166057432','Fun Day','V','0')
LOG: duration: 6093.724 ms statement: insert into statistics_search(date,search,type,id_member) VALUES ('1166057433','party','V','0')
LOG: duration: 5855.535 ms statement: update videos set watched=watched+1, last_view_date='1166057433' where id='102462'
LOG: duration: 5464.827 ms statement: update videos set watched=watched+1, last_view_date='1166057433' where id='103901'
LOG: duration: 8917.981 ms statement: update users_auth set date_last='1166057430' where id='384891'
LOG: duration: 7584.912 ms statement: update videos set watched=watched+1, last_view_date='1166057431' where id='103164'
LOG: duration: 5181.864 ms statement: update videos set watched=watched+1, last_view_date='1166057434' where id='112060'
LOG: duration: 38394.879 ms statement: update upload_synchronizer set lock_status='N' where sess_id='103503'

How i can tune database for quick updates?
I have SATA RAID1.

Thank you all for your answers.

--
Anton P. Linevich

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Rajesh Kumar Mallah 2006-12-14 02:02:39 Re: Slowly Queries
Previous Message Joshua D. Drake 2006-12-13 23:59:09 Re: Should duplicate indexes on same column and same