Re: [GENERAL] Query sometimes takes down server

2009-01-16 Thread Jason Long
David Wilson wrote: On Fri, Jan 16, 2009 at 3:27 PM, Jason Long wrote: I just tried it by sending text only instead of text and html. We will see if it goes through this time. Other than that do you see anything weird about my email? Still nothing. Do you have webspace you could pla

Re: [GENERAL] Query sometimes takes down server

2009-01-16 Thread David Wilson
On Fri, Jan 16, 2009 at 3:27 PM, Jason Long wrote: > I just tried it by sending text only instead of text and html. We will see > if it goes through this time. > Other than that do you see anything weird about my email? Still nothing. Do you have webspace you could place it on? If not, you coul

Re: [GENERAL] Query sometimes takes down server

2009-01-16 Thread Jason Long
Scott Marlowe wrote: On Thu, Jan 15, 2009 at 11:04 PM, Jeff Davis wrote: On Thu, 2009-01-15 at 19:37 -0600, Jason Long wrote: I have not looked into the detail of the explain, and I do see visually that very different plans are being chosen. It would help to share these pl

Re: [GENERAL] Query sometimes takes down server

2009-01-16 Thread Jason Long
Scott Marlowe wrote: Weird. I wonder if the attachment is too big and the mailing list server is chopping it off of the email. I just tried it by sending text only instead of text and html. We will see if it goes through this time. Other than that do you see anything weird about my email?

Re: [GENERAL] Query sometimes takes down server

2009-01-16 Thread Scott Marlowe
Weird. I wonder if the attachment is too big and the mailing list server is chopping it off of the email. On Fri, Jan 16, 2009 at 1:19 PM, Jason Long wrote: > Scott Marlowe wrote: > > On Thu, Jan 15, 2009 at 11:04 PM, Jeff Davis wrote: > > > On Thu, 2009-01-15 at 19:37 -0600, Jason Long wrote:

Re: [GENERAL] Query sometimes takes down server

2009-01-16 Thread Scott Marlowe
On Thu, Jan 15, 2009 at 11:04 PM, Jeff Davis wrote: > On Thu, 2009-01-15 at 19:37 -0600, Jason Long wrote: >> > >> > > I have not looked into the detail of the explain, and I do see visually >> > > that very different plans are being chosen. >> > > >> > >> > It would help to share these plans with

Re: [GENERAL] Query sometimes takes down server

2009-01-16 Thread Jeff Davis
On Fri, 2009-01-16 at 13:37 -0500, Martin Gainty wrote: > good idea although tweaks to geqo_pool_size, geqo_generations, and > geqo_selection_bias will affect all queries Only queries that invoke GEQO. Regards, Jeff Davis -- Sent via pgsql-general mailing list (pgsql-general@postgresql

Re: [GENERAL] Query sometimes takes down server

2009-01-16 Thread Jeff Davis
On Fri, 2009-01-16 at 12:35 -0600, Jason Long wrote: > The schema is not auto generated. It evolved as I created my > inventory system. > It is relatively easy for humans to understand. Or at least for me > since I wrote it. On second look, there aren't that many tables. There are just a lot o

Re: [GENERAL] Query sometimes takes down server

2009-01-16 Thread Jason Long
Jeff Davis wrote: On Fri, 2009-01-16 at 08:43 -0600, Jason Long wrote: The numbers in the table names are due to hibernate generating the query. Well, that's what auto-generated schemas and queries do, I guess. The schema is not auto generated. It evolved as I created my inventor

Re: [GENERAL] Query sometimes takes down server

2009-01-16 Thread Martin Gainty
RAL] Query sometimes takes down server > From: pg...@j-davis.com > To: ja...@octgsoftware.com > CC: pgsql-general@postgresql.org > Date: Fri, 16 Jan 2009 10:07:26 -0800 > > On Fri, 2009-01-16 at 08:43 -0600, Jason Long wrote: > > The numbers in the table names are due

Re: [GENERAL] Query sometimes takes down server

2009-01-16 Thread Jeff Davis
On Fri, 2009-01-16 at 08:43 -0600, Jason Long wrote: > The numbers in the table names are due to hibernate generating the > query. Well, that's what auto-generated schemas and queries do, I guess. > Now we are getting somewhere. > Someone suggested tweaking the genetic algorithm parameters. > H

Re: [GENERAL] Query sometimes takes down server

2009-01-15 Thread Jeff Davis
On Thu, 2009-01-15 at 19:37 -0600, Jason Long wrote: > > > > > I have not looked into the detail of the explain, and I do see visually > > > that very different plans are being chosen. > > > > > > > It would help to share these plans with us... > > > See EXPLAIN ANALYZE below for three

Re: [GENERAL] Query sometimes takes down server

2009-01-15 Thread marcin mank
> I have a dynamically built query that will periodically(2 times a day and > becoming more frequent) make my server totally unresponsive. does this query involve more than geqo_threshold (default 12) tables? If so, this most probably is geqo (genetic query optimizer) kicking in. Try to fiddle wi

Re: [GENERAL] Query sometimes takes down server

2009-01-15 Thread Jeff Davis
On Thu, 2009-01-15 at 18:44 -0600, Jason Long wrote: > The query that hangs the system is requesting a count(*) > based on some parameters the users selects. Can you show an example of the full offending query? How big is the table? > And maybe 1 in 20 will not complete. If you really have nothi

[GENERAL] Query sometimes takes down server

2009-01-15 Thread Jason Long
I am having a serious problem with my application and I hope someone can help me out. This could not happen at a worse time as a consulting firm is at my clients to recommend a new financial system and the inventory system(which I developed) keeps locking up. I have a dynamically built query t