Re: [PERFORM] One query run twice in parallel results in huge performance decrease

2013-11-29 Thread Tom Lane
Jan Michel writes: > All tables are generated freshly from scratch by the same script only > minutes before this query is run. I tested them all individually and > never saw any problem, all use the same plan. As soon as I run two in > parallel it happens. I also did a test by feeding two table

Re: [PERFORM] One query run twice in parallel results in huge performance decrease

2013-11-29 Thread Jan Michel
Hi Jeff, thanks for the answer. On 29.11.2013 23:42, Jeff Janes wrote: The planner is not aware of what else is going on in the server I was not aware of this as well. I'd guess that the 2nd database is missing the geometry index, or has it defined in some different way such that the database

Re: [PERFORM] One query run twice in parallel results in huge performance decrease

2013-11-29 Thread Jeff Janes
On Fri, Nov 29, 2013 at 2:07 PM, Jan Michel wrote: > > When I run a second instance of this query in a unrelated database on the > same server, they take 100% CPU, no iowait and they do not finish even > after more than a day. > The planner is not aware of what else is going on in the server, so

[PERFORM] One query run twice in parallel results in huge performance decrease

2013-11-29 Thread Jan Michel
Dear all, I have a quite strange problem running an extensive query on geo data checking for crossing ways. I don't know if this is a postgres or postgis problem, but I hope you can help. Running one thread is no problem, it finishes within 10-15 minutes. Run two of those queries in parallel and t