X-Original-To: pgsql-general@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 54DBB47580B for ; Thu, 27 Mar 2003 11:24:00 -0500 (EST) Received: from satchel.bteg.net (satchel.bteg.net [64.71.165.199]) by postgresql.org (Postfix) with ESMTP id 6E4F6474E44 for ; Thu, 27 Mar 2003 11:23:59 -0500 (EST) Received: from justsportsusa.com (c-66-229-192-15.we.client2.attbi.com [66.229.192.15]) by satchel.bteg.net (8.12.8/8.12.5) with ESMTP id h2RGNjOp028340; Thu, 27 Mar 2003 08:23:46 -0800 Message-ID: <3E83259D.8090909@justsportsusa.com> Date: Thu, 27 Mar 2003 08:23:57 -0800 From: "Gavin M. Roy" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Loki Cc: pgsql-general@postgresql.org Subject: Re: PostgreSQL + IDS load/latency help References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.25 (www . roaringpenguin . com / mimedefang) X-Spam-Status: No, hits=-31.5 required=5.0 tests=BAYES_10,IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT_MOZILLA_UA autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200303/1398 X-Sequence-Number: 39888 Have you used "explain" on your queries to make sure they are not using seq scan? I've got tens of millions of records in my master database and get 1 second response times with the right indexes created. Gavin Loki wrote: > Lists: > > We have a PostgreSQL database full of over 500,000 events. When the > database has a small number of events, to retrieve a specific event > stored in that db takes a mere few seconds. > However, as the database grew in size to where it is now, it takes > over 15-20 seconds to get information back from a query to that > database. We have tried everything, including vacuum, which someone > else recommended to me. > > I noticed when running top(exec) on the system that the PostgreSQL > process eventually eats up ALL available RAM (half a gig of RAM) and > forces the system into scratch space. When rebooting the machine the > query time is greatly improved back down to a reasonable query time, > (obviously because it hasnt eaten up all the memory yet.) > > Am I correct in saying that 500,000 events shouldn't be a problem? Is > there anyone out there with more than 500,000 events in their DB than > what we currently have? > > Can anyone recommend anything to try or do to rectify the situation. > 15-20 seconds to get the information queried from the database is > unacceptable and can not work. Please advise. > > * We are running Snort 1.9.1 storing events to a custom PostgreSQL > database. Dumping the database and creating a new one every so often > is also not an option. Can anyone provide assistance? Please advise. > > For those needing more details on our setup, etc. I am not currently > able to log into the system. Please email me and I can provide you > more details offline. > > Sincerely, > > Eric Hines > Internet Warfare and Intelligence > Fate Research Labs > http://www.fatelabs.com > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faqs/FAQ.html > >