Re: Include a timestamp in future versions of pg_stat_statements when when a query entered the cache?

2023-12-05 Thread Julien Rouhaud
Hi, On Tue, Dec 05, 2023 at 06:28:54AM -0800, Jerry Brenner wrote: > It would be helpful if a timestamp column was added to pg_stat_statements > to denote when a query entered the view. This would make it easier to tell > how frequently a query is being executed (100,000 times since a specific >

Re: Does Postgres have consistent identifiers (plan hash value) for explain plans?

2023-12-04 Thread Julien Rouhaud
Hi, On Mon, Dec 04, 2023 at 06:45:39AM -0800, Jerry Brenner wrote: > We are currently on Postgres 13.9 (and will be moving to later releases). > We are capturing json explain plans and storing them in a database table. > We can tell that there are different plans for some queries, but that's a >

Re: Weird behavior of INSERT QUERY

2023-06-04 Thread Julien Rouhaud
Please don't top post on this mailing list: https://wiki.postgresql.org/wiki/Mailing_Lists#Email_etiquette_mechanics On Sun, Jun 4, 2023 at 7:42 PM Satalabaha Postgres wrote: > > Yes both in both the cases the same tables are accessed. Yes we tried > indexing as well, but we have the same

Re: Weird behavior of INSERT QUERY

2023-06-04 Thread Julien Rouhaud
Hi, On Sun, Jun 04, 2023 at 02:04:52PM +0530, Satalabaha Postgres wrote: > > DB : postgres 14. > > We are experiencing weird performance issue of one simple insert statement > taking several minutes to insert data. The application calls insert > statement via stored procedure show mentioned

Re: Understand time taken by individual SQL statements in a procedure

2023-06-03 Thread Julien Rouhaud
Hi, On Sat, Jun 03, 2023 at 12:48:37PM +0530, Satalabaha Postgres wrote: > Hi Listers, > > We would like to determine how long it takes for each SQL statement to > execute within a long-running procedure. I tried to see if > pg_stat_statements could offer any insight into the matter. But I was >

Re: ogr2ogr slow sql when checking system tables for column info and so on.

2022-10-21 Thread Julien Rouhaud
Hi, On Fri, Oct 21, 2022 at 10:30:27AM +, Lars Aksel Opsahl wrote: > > > > >In both case you have a sequential scan over the pg_attribute table, but for > >pg_catalog it takes 17 seconds to retrieve the 1.4M rows, and in the new > >table > >it takes 156 ms. > > > >It looks like you catalog

Re: ogr2ogr slow sql when checking system tables for column info and so on.

2022-10-21 Thread Julien Rouhaud
Hi, On Fri, Oct 21, 2022 at 09:19:58AM +, Lars Aksel Opsahl wrote: > > The main problem is that for instance ogr2ogr is using more time to get > system info about tables than doing the actual job. > > The time pick up postgresql meta info takes between 30 and 60 seconds and > sometimes

Re: Identify root-cause for intermittent spikes

2022-10-15 Thread Julien Rouhaud
On Fri, Oct 14, 2022 at 10:57:00PM +0530, Sengottaiyan T wrote: > > Please suggest: Is there any open-source tool available for capturing such > information? Most of the open-source tools won't work as you won't be able to install them on RDS. As far as I know the "Performance Insights" provides

Re: Explain analyse with track_io_timing

2022-03-09 Thread Julien Rouhaud
Hi, On Thu, Mar 10, 2022 at 10:40:17AM +0530, Jayadevan M wrote: > > What is the unit of I/O Timings in explain (analyze, buffers) ? milliseconds > There is a plan with quite a few nodes. In each case, the value of I/O > Timings is much more than the time for the outer node. A few lines from

Re: Never Ending query in PostgreSQL

2022-02-27 Thread Julien Rouhaud
Hi, On Sun, Feb 27, 2022 at 04:40:16AM +, Kumar, Mukesh wrote: > > Can you please help in tunning the attached query as , i am trying to run > this query and it runs for several hours and it did not give any output. > > I am not able to generate the explain analyze plan as well and it keeps

Re: About Query Performaces Problem

2022-01-12 Thread Julien Rouhaud
Hi, On Wed, Jan 12, 2022 at 11:23:33AM +0300, Hüseyin Ellezer wrote: > I mean, despite the execution times shown here PostgreSQL 10 is working > faster compared to PostgreSQL 14. Please don't top-post here, see https://wiki.postgresql.org/wiki/Mailing_Lists for more details. > Is this speed

Re: Better, consistent instrumentation for postgreSQL using a similar API as Oracle

2021-10-08 Thread Julien Rouhaud
On Fri, Oct 8, 2021 at 11:40 PM Bruce Momjian wrote: > > On Fri, Oct 8, 2021 at 05:28:37PM +0200, Thomas Kellerer wrote: > > > > We typically use the AWR reports as a post-mortem analysis tool if > > something goes wrong in our application (=customer specific projects) > > > > E.g. if there was

Re: sql execution time in pg_stat_statements

2021-09-10 Thread Julien Rouhaud
On Sat, Sep 11, 2021 at 1:12 AM Michel SALAIS wrote: > > I thaught that total_time (total_exec_time + total_plan_time) included I/O > but when we have blk_read_time + blk_write_time equals several times > total_time it is difficult to continue to think that... Maybe not that difficult. If

Re: sql execution time in pg_stat_statements

2021-09-09 Thread Julien Rouhaud
On Fri, Sep 10, 2021 at 2:49 AM Michel SALAIS wrote: > > I think that total_time in pg_stat_statements is cpu time + possible waits. > So, can I say that: > > Total_sql_time = total_time + blk_read_time + blk_write_time > > Documentation is not clear at all on that. In version 12 and below,

Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4

2021-09-02 Thread Julien Rouhaud
On Thu, Sep 2, 2021 at 11:22 PM Andrew Dunstan wrote: > > Here are a couple of pictures of profiles made with a tool called > sleepy. The bad profile is from release 13.4 built with the latest > gettext, built with vcpkg. The good profile is the same build but using > the intl-8.dll copied from

Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4

2021-08-31 Thread Julien Rouhaud
On Wed, Sep 1, 2021 at 1:56 AM Andrew Dunstan wrote: > > The culprit turns out to be the precise version of libiconv/libintl > used. There is a slight difference between the versions used in the > 11.13 installer and the 13.4 installer. We need to dig into performance > more (e.g. why does the

Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4

2021-08-31 Thread Julien Rouhaud
On Tue, Aug 31, 2021 at 10:51 PM l...@laurent-hasson.com wrote: > > OK... I thought that track had been abandoned as per Julien's last message. > Anyways, I'll be patient! > I just happened to have both standard installer and locally compiled versions available, so I could confirm that I

Re: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4

2021-08-29 Thread Julien Rouhaud
On Mon, Aug 30, 2021 at 8:44 AM l...@laurent-hasson.com wrote: > > Yeah, grasping at straws... and no material changes  This is mystifying. > > show lc_messages; > -- English_United States.1252 > > create table sampletest (a varchar, b varchar); > insert into sampletest (a, b) > select

Re: Estimating wal_keep_size

2021-06-18 Thread Julien Rouhaud
Le sam. 19 juin 2021 à 02:13, Dean Gibson (DB Administrator) < postgre...@mailpen.com> a écrit : > > Granted, but the same question arises about the value for > max_slot_wal_keep_size. Setting either too low risks data loss, & setting > either too high results in unnecessary disk space used.

Re: Estimating wal_keep_size

2021-06-16 Thread Julien Rouhaud
On Wed, Jun 16, 2021 at 05:36:24PM -0700, Dean Gibson (DB Administrator) wrote: > Is this reasonable thinking? > > I'd think that one would want a *wal_keep_size* to cover the pending updates > while the standby server might be unavailable, however long one might > anticipate that would be. It's

Re: overcommit_ratio setting

2021-06-14 Thread Julien Rouhaud
On Mon, Jun 14, 2021 at 06:16:35PM +0800, Yi Sun wrote: > > So is it OK just to configure vm.overcommit_ratio to 90 please? This parameter entirely depends on the amount of RAM and swap you have on your server, and how much memory you want to be allocable. See

Re: dexter on AWS RDS auto tune queries

2021-06-07 Thread Julien Rouhaud
Please don't top post here. On Mon, Jun 7, 2021 at 3:50 PM Ayub Khan wrote: > > @Christophe: yes I am using RDS performance insights, however it might be > more helpful if it could give more info about the slowness of the queries and > what improvements could be done to the queries itself. > >

Re: dexter on AWS RDS auto tune queries

2021-06-06 Thread Julien Rouhaud
Hi, On Mon, Jun 7, 2021 at 12:52 PM Ayub Khan wrote: > > Other than Dexter, Is there an auto tune or query performance indicator for > postgres ? It depends. If you're on AWS or any other cloud, probably nothing apart from tools based on logs or standard SQL execution (so nothing based on

Re: different execution time for the same query (and same DB status)

2021-03-07 Thread Julien Rouhaud
On Sun, Mar 07, 2021 at 03:51:05PM +0100, Michel SALAIS wrote: > > Have you tried to use EXPLAIN ANALYZE at least? > > It could give valuable information about why this is occurring. +1, and more generally please follow https://wiki.postgresql.org/wiki/Slow_Query_Questions.

Re: Postgres performance comparing GCP and AWS

2021-02-24 Thread Julien Rouhaud
Hi, On Wed, Feb 24, 2021 at 6:14 AM Maurici Meneghetti wrote: > > I have 2 postgres instances created from the same dump (backup), one on a GCP > VM and the other on AWS RDS. The first instance takes 18 minutes and the > second one takes less than 20s to run this simples query: > SELECT "Id",

Re: BUG #16334: We recently upgraded PG version from 9.5 to 10.10 and system performance is not so good

2020-04-04 Thread Julien Rouhaud
Once again, please don't top post. On Sat, Apr 04, 2020 at 11:57:02AM +0530, Tejaswini GC wrote: > Hello Julien, > > The procedure for doing the upgrade is different for AWS. > And is it possible to know what the procedure was? > > After the PG upgrade we can see many locks in our system

Re: BUG #16334: We recently upgraded PG version from 9.5 to 10.10 and system performance is not so good

2020-04-02 Thread Julien Rouhaud
A regular vacuum, as in: VACUUM ANALYZE in all your databases. > On Thu, Apr 2, 2020 at 2:17 PM Julien Rouhaud wrote: > > > Hi, > > > > On Thu, Apr 02, 2020 at 03:52:25AM +, PG Bug reporting form wrote: > > > The following bug has been logged

Re: BUG #16334: We recently upgraded PG version from 9.5 to 10.10 and system performance is not so good

2020-04-02 Thread Julien Rouhaud
Hi, On Thu, Apr 02, 2020 at 03:52:25AM +, PG Bug reporting form wrote: > The following bug has been logged on the website: > > Bug reference: 16334 > Logged by: Tejaswini GC > Email address: tejaswini...@decathlon.com > PostgreSQL version: 10.10 > Operating system:

Re: Oracle to postgres migration

2019-04-08 Thread Julien Rouhaud
On Mon, Apr 8, 2019 at 1:49 PM Daulat Ram wrote: > > Please confirm ! Can we migrate Oracle 12c database (12.1.0.1.0) running on > Solaris to PostgreSQL 11.2 on Linux (Ubuntu). Also, please suggest the tools > and pre-requisites. A database migration is likely feasible, but might require quite

Re: rusage (Re: Good afternoon.)

2019-03-06 Thread Julien Rouhaud
On Wed, Mar 6, 2019 at 11:49 PM Justin Pryzby wrote: > > Hi, > > On Wed, Mar 06, 2019 at 04:09:46PM -0400, Kenia Vergara wrote: > > Good afternoon. > > I need to know the commands to display the execution time, CPU usage and > > memory usage, but through the Postgres console.Thank you. > > Does

Re: Detect missing combined indexes (automatically)

2019-01-15 Thread Julien Rouhaud
Hi, On Tue, Jan 15, 2019 at 10:22 AM Thomas Güttler wrote: > > Hi Julien Rouhaud, > > powa can handle multi-column indexes now? Great news. This must be a new > feature. I checked this roughly one year ago and it was not possible at this > time. > Thank you very m

Re: Profile what the production server is doing

2018-07-25 Thread Julien Rouhaud
On Wed, Jul 25, 2018 at 11:14 AM, Thomas Güttler wrote: > > AFAIK powa is based on pg_stat_statements not on statistical samples. > But maye I am wrong. Indeed, it's based on pg_stat_statements, but other extensions are supported too. Since pg_stat_statements already provides cumulated

Re: Profile what the production server is doing

2018-07-23 Thread Julien Rouhaud
Hi, On Mon, Jul 23, 2018 at 1:18 PM, Thomas Güttler wrote: > Is there a tool which does this for PostgreSQL? > > Take a "snapshot" of what the server is doing about 10 times per second. > Write this to a file. > After N hours you can aggregate the file. > What does the server do most of the