pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: androxkentaki . <androxkentaki@gmail.com>
To: liam saffioti <liam.saffiotti@gmail.com>
To: Mladen Gogala <gogala.mladen@gmail.com>
Cc: pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: AW: postgresql long running query
Date: Wed, 8 Dec 2021 18:57:22 +0000
Message-ID: <AM0PR10MB31859B492561952578F7C16CFD6F9@AM0PR10MB3185.EURPRD10.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <CAGHjuaam+KTuvGXXF0p=vK2-nNCgBmjbnuMHcf9GrA4oUR_O9w@mail.gmail.com>
References: <CAGHjuaZkGZVRK6OC4ifBJVQ+=1Y=0CXdDnZ7sjHkdfY2wkACVg@mail.gmail.com>
	<8718fe01e83140b18f7bc8777469c44d@MITMB5.helios.med.uni-muenchen.de>
	<CAGHjuaazpSSiQA6YrxXw3j3uqTwRkzhRgQ=_6ga+AuWZ0LwD6A@mail.gmail.com>
	<52ae89c7f1564de085f43510f39982f9@MITMB5.helios.med.uni-muenchen.de>
	<CAGHjuaaAKsrSWjyjexo8AzgWkpdo_mKtp72hr=Q9hy7oqOHjLw@mail.gmail.com>
	<07b023154ae14171a05a802e4dbe1cb2@MITMB5.helios.med.uni-muenchen.de>
	<f8d3af50-eabe-4b85-e1ce-ac63d1c8fe92@gmail.com>
	<CAGHjuaam+KTuvGXXF0p=vK2-nNCgBmjbnuMHcf9GrA4oUR_O9w@mail.gmail.com>

Can you tell us how do you run query at night?
IS it via Odbc? Or direct by pgsql script in cron?

Pozdrawiam
Andrzej Gerasimuk
________________________________
From: liam saffioti <liam.saffiotti@gmail.com>
Sent: Wednesday, December 8, 2021 4:19:33 PM
To: Mladen Gogala <gogala.mladen@gmail.com>
Cc: pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: AW: postgresql long running query

Hi everyone,

Thank you for your help. But my query is not always slow. It works fast under normal conditions, but in a way that I don't understand it works very slow at some times.
I think there may be a different reason why a query that takes 800ms, in general, takes 18 minutes at a time.

Thanks a lot
Liam

Mladen Gogala <gogala.mladen@gmail.com<mailto:gogala.mladen@gmail.com>>, 8 Ara 2021 Çar, 17:11 tarihinde ºunu yazd¹:
On 12/8/21 06:13, Dischner, Anton wrote:



Do optimizer hints in PG exists?



Obviously not: https://wiki.postgresql.org/wiki/OptimizerHintsDiscussion

Yes, they do exist: http://pghintplan.osdn.jp/pg_hint_plan.html

Packages can be downloaded here: https://osdn.net/projects/pghintplan/releases/73862

There is no package for version 14, you will have to build it from the source:

https://github.com/ossc-db/pg_hint_plan

--
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com

view thread (9+ messages)  latest in thread

Message-ID: <AM0PR10MB31859B492561952578F7C16CFD6F9@AM0PR10MB3185.EURPRD10.PROD.OUTLOOK.COM>
Permalink:  ../AM0PR10MB31859B492561952578F7C16CFD6F9@AM0PR10MB3185.EURPRD10.PROD.OUTLOOK.COM/
Also on:    postgresql.org/message-id/AM0PR10MB31859B492561952578F7C16CFD6F9@AM0PR10MB3185.EURPRD10.PROD.OUTLOOK.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: androxkentaki@gmail.com, liam.saffiotti@gmail.com, gogala.mladen@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: AW: postgresql long running query
  In-Reply-To: <AM0PR10MB31859B492561952578F7C16CFD6F9@AM0PR10MB3185.EURPRD10.PROD.OUTLOOK.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