Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id AB7D764FCFF for ; Mon, 28 Jul 2008 03:50:52 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 29274-09 for ; Mon, 28 Jul 2008 03:50:43 -0300 (ADT) X-Greylist: delayed 00:06:40.213992 by SQLgrey-1.7.6 Received: from smtp-a.tvnetwork.hu (smtp-a.tvnetwork.hu [80.95.81.66]) by postgresql.org (Postfix) with SMTP id 7E6A564FCC0 for ; Mon, 28 Jul 2008 03:50:44 -0300 (ADT) Received: (qmail 18324 invoked by uid 1001); 28 Jul 2008 08:48:10 +0200 Received: from 84.236.80.89 by smtp-a.tvnetwork.hu (envelope-from , uid 64011) with qmail-scanner-1.25st (clamdscan: 0.88.1/1396. spamassassin: 3.0.3. perlscan: 1.25st. Clear:RC:1(84.236.80.89):SA:0(-2.5/5.0):. Processed in 9.939147 secs); 28 Jul 2008 06:48:10 -0000 X-Envelope-From: gfaludi@fits.hu Received: from unknown (HELO fitsdevpc) (84.236.80.89) by smtp-a.tvnetwork.hu with SMTP; 28 Jul 2008 08:48:00 +0200 From: =?iso-8859-2?Q?Faludi_G=E1bor?= To: Subject: how does pg handle concurrent queries and same queries Date: Mon, 28 Jul 2008 08:43:51 +0200 Message-ID: <000301c8f07d$4bee0f10$e3ca2d30$@hu> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0004_01C8F08E.0F76DF10" X-Mailer: Microsoft Office Outlook 12.0 thread-index: AcjwfUt5W36Wx6wHT6q2NfwtfeOtww== Content-Language: hu X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200807/232 X-Sequence-Number: 30832 Ez egy többrészes, MIME formátumú üzenet. ------=_NextPart_000_0004_01C8F08E.0F76DF10 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Hi All, =20 I have taken over the maintenance of a server farm , recently. 2 = webserver on db server. They are quite powerful 2 processor xeon w/ 6Gig of ram . =20 Couple of days ago we had a serious performance hit and the db server = (pg. v7.4) was overloaded w/ something in a way that operating system was = almost not able to respond or in cases it did not. =20 =20 After some analysis i suspect that there is a query that takes up to 1 second and that is the cause. Upon each page loading this query fires = and takes the one second and blocks the page to load completly . The load = was roughly ~300 connections in one minute . =20 So here are my questions :=20 =20 . Why does the second and the later queries take the whole on = second if the dataset is the same . Shouldn't PG realise that the query is the = same so i give the user the same resultset ? . How do I know if one query blocks the other ? . Is there a way to log the long running queries in 7.4 ? If not = is it available in any newer version ? =20 thanks for your help !=20 =20 =DCdv=F6zlettel/kind regards, Faludi, G=E1bor FITS Magyarorsz=E1g Kft. http://www.FITS.hu Tel.:+36 30 4945862 Email: falu@fits.hu Ingyenes vide=F3 tanfolyamok(Excel,Access,Word) : http://www.fits.hu/trainings =20 ------=_NextPart_000_0004_01C8F08E.0F76DF10 Content-Type: text/html; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable

Hi All,

 

I have taken over the maintenance of a server farm = , recently. 2 webserver on=A0 db server. They are quite powerful 2 = processor xeon w/ 6Gig of ram .

 

Couple of days ago we had a serious performance hit = and the db server (pg. v7.4) was overloaded w/ something in a way that operating = system was almost not able to respond or in cases it did not.

 

 

After some analysis i suspect that there is a query = that takes up to 1 second and that is the cause. Upon=A0 each page loading = this query fires and takes the one second and blocks the page to load completly . = The load was roughly ~300 connections in one minute .

 

So here are my questions :

 

·         Why does the second and the later queries = take the whole on second if the dataset is the same . Shouldn’t PG = realise that the query is the same so i give the user the same resultset ?

·         How do I know if one query blocks the = other ?

·         Is there a way to log the long running = queries in 7.4 ? If not is it available in any newer version ?

 

thanks for your help ! =

 

=DCdv=F6zlettel/ki= nd regards,

Faludi, G=E1bor

FITS Magyarorsz=E1g Kft.

http://www.FITS.hu

Tel.:+36 30 4945862

Email: falu@fits.hu

I= ngyenes vide=F3 tanfolyamok(Excel,Access,Word) : http://www.fits.hu/trainings=

 

------=_NextPart_000_0004_01C8F08E.0F76DF10--