Re: [PERFORM] Random slow queries

2016-07-19 Thread Jim Nasby
On 6/29/16 1:01 PM, devel.brai...@xoxy.net wrote: During my test run, there was one offending query invocation, a simple SELECT * FROM job WHERE field = $1 Of course the actual query specified the list of fields as it was generated by Hibernate, but that is what it boils down to - no joins etc.

Re: [PERFORM] Random slow queries

2016-07-04 Thread devel . brain99
On 29 June 2016 at 22:20, Tom Lane wrote: > Don't know if it would be practical for you at all, but if you could > attach to a process that's stuck like this with a debugger and get a stack > trace, that would probably be very informative. It seems I have found the cause of

Re: [PERFORM] Random slow queries

2016-06-29 Thread Tom Lane
Jeff Janes writes: > On Tue, Jun 28, 2016 at 6:24 PM, wrote: >> PostgreSQL 9.3.4, compiled by Visual C++ build 1600, 64-bit > The current minor version of that branch is 9.3.13, so you are 9 bug > fix releases behind. Definitely a fair complaint.

Re: [PERFORM] Random slow queries

2016-06-29 Thread Jeff Janes
On Tue, Jun 28, 2016 at 6:24 PM, wrote: > > > PostgreSQL version: > PostgreSQL 9.3.4, compiled by Visual C++ build 1600, 64-bit The current minor version of that branch is 9.3.13, so you are 9 bug fix releases behind. I don't know if this matters, because I see that my

Re: [PERFORM] Random slow queries

2016-06-29 Thread Tom Lane
devel.brai...@xoxy.net writes: > As you can see from the logs I posted, it appears the execution plan was > cached (LOG: duration: 122006.000 ms bind cached-1453392550: select). > Maybe those aren't processed by auto_explain? In that, "cached-1453392550" is a statement name given by the

Re: [PERFORM] Random slow queries

2016-06-29 Thread devel . brain99
On 29 June 2016 at 16:32, Igor Neyman wrote: > Did you try AUTO_EXPLAIN extension > (https://www.postgresql.org/docs/9.3/static/auto-explain.html) for > diagnostic purposes? > With auto_explain.loganalize = true it will log automatically EXPLAIN > ANALYZE output, rather

Re: [PERFORM] Random slow queries

2016-06-29 Thread devel . brain99
On 29 June 2016 at 14:45, Kevin Grittner wrote: > Please monitor for the start of such an event and capture the full > contents of pg_stat_activity and pg_locks during that 2 minute > window. I had already looked at that manually and found nothing unusual. To be more thorough,

Re: [PERFORM] Random slow queries

2016-06-29 Thread Igor Neyman
-Original Message- From: pgsql-performance-ow...@postgresql.org [mailto:pgsql-performance-ow...@postgresql.org] On Behalf Of devel.brai...@xoxy.net Sent: Tuesday, June 28, 2016 9:24 PM To: pgsql-performance@postgresql.org Subject: [PERFORM] Random slow queries Hi, I have a weird slow

Re: [PERFORM] Random slow queries

2016-06-29 Thread Kevin Grittner
On Tue, Jun 28, 2016 at 8:24 PM, wrote: > The problem: > Most queries execute fast, however sometimes queries on the job > table (which contains the job queue) take exactly 122 seconds > (+ 0-50ms) to execute for no clear reason. > Have I missed something obvious?

[PERFORM] Random slow queries

2016-06-28 Thread devel . brain99
Hi, I have a weird slow query issue I can't seem to find the cause of, so I'm hoping someone here can shed some light on this. Context: I have an application which (among other things) implements a sort of job queue using postgres for persistence. While I know a RDBMS is not necessarily the most