Re: [PERFORM] How to improve db performance with $7K?

2005-03-28 Thread Steve Poe
Cott Lang wrote: Have you already considered application/database tuning? Adding indexes? shared_buffers large enough? etc. Your database doesn't seem that large for the hardware you've already got. I'd hate to spend $7k and end up back in the same boat. :) Cott, I agree with you. Unfortunate

Re: [PERFORM] JDBC best practice

2005-03-28 Thread Kris Jurka
On Mon, 28 Mar 2005, Dave Held wrote: > I'm using a Postgres table as the data source for a JTable in a Java > app. Where rs_ is a RecordSet object. What I'm wondering is whether > it's better to call absolute() or relative() or next()/previous(). If > absolute() is the slowest call, then I c

Re: [PERFORM] which dual-CPU hardware/OS is fastest for PostgreSQL?

2005-03-28 Thread Greg Stark
Bruce Momjian writes: > I asked 3ware this at the Linuxworld Boston show and they said their > controller keeps the information in cache until they are sure it is on > the platters and not just in the disk cache, but that is far from a 100% > reliable report. Hm. Well, keeping it in cache is one

Re: [PERFORM] which dual-CPU hardware/OS is fastest for PostgreSQL?

2005-03-28 Thread Klint Gore
Anyone using power5 platform? something like an ibm eserver p5 520 running red hat linux. (http://www-1.ibm.com/servers/eserver/pseries/hardware/entry/520.html)? klint. +---+-+ : Klint Gore: "Non rhyming: : EMail

Re: [PERFORM] which dual-CPU hardware/OS is fastest for PostgreSQL?

2005-03-28 Thread Bruce Momjian
Greg Stark wrote: > "Joshua D. Drake" <[EMAIL PROTECTED]> writes: > > > > I assume AMCC == 3ware now? > > > > > > Has anyone verified that fsync is safe on these controllers? Ie, that they > > > aren't caching writes and "lying" about the write completing like IDE > > > drives often do by default

[PERFORM] JDBC best practice

2005-03-28 Thread Dave Held
I'm using a Postgres table as the data source for a JTable in a Java app. As a first approximation, I'm implementing AbstractTableModel.getValueAt() like so: public Object getValueAt(int row, int col) { try { rs_.absolute(row + 1); return rs_.getOb

Re: [PERFORM] Delete query takes exorbitant amount of time

2005-03-28 Thread Simon Riggs
On Fri, 2005-03-25 at 09:38 -0800, Josh Berkus wrote: > > I guess I was wondering if there is other general tuning advice for such > > large table indexes such as increasing statistics, etc. > > If you're going with the drop/load/recreate option, then I'd suggest > increasing work_mem for the du

Re: [PERFORM] How to improve db performance with $7K?

2005-03-28 Thread Cott Lang
Have you already considered application/database tuning? Adding indexes? shared_buffers large enough? etc. Your database doesn't seem that large for the hardware you've already got. I'd hate to spend $7k and end up back in the same boat. :) On Sat, 2005-03-26 at 13:04 +, Steve Poe wrote: >

Re: [PERFORM] which dual-CPU hardware/OS is fastest for PostgreSQL?

2005-03-28 Thread Greg Stark
"Joshua D. Drake" <[EMAIL PROTECTED]> writes: > > I assume AMCC == 3ware now? > > > > Has anyone verified that fsync is safe on these controllers? Ie, that they > > aren't caching writes and "lying" about the write completing like IDE > > drives often do by default? > > The higher end AMCC/3ware

Re: [PERFORM] Delete query takes exorbitant amount of time

2005-03-28 Thread Simon Riggs
On Mon, 2005-03-28 at 13:03 -0700, Karim A Nassar wrote: > > Well, based upon the evidence so far, the Optimizer got it right: > > Agreed. So, this means that the answer to my original question is "that > delete gonna take a long time"? > > Seems that there is still something wrong. From what I c

Re: [PERFORM] Preventing query from hogging server

2005-03-28 Thread Jim C. Nasby
On Thu, Mar 24, 2005 at 01:07:39PM -0600, Matthew Nuzum wrote: > I've tried `nice psql` in the past and I don't think that had much impact, > but I haven't tried it on this query. On linux, nice will only help if the query is CPU-bound. On FreeBSD, nice affects I/O scheduling, as well as CPU, so i

Re: [PERFORM] which dual-CPU hardware/OS is fastest for PostgreSQL?

2005-03-28 Thread Joshua D. Drake
> I assume AMCC == 3ware now? > > Has anyone verified that fsync is safe on these controllers? Ie, that they > aren't caching writes and "lying" about the write completing like IDE > drives often do by default? The higher end AMCC/3ware controllers actually warn you about using write-cache. You

Re: [PERFORM] which dual-CPU hardware/OS is fastest for PostgreSQL?

2005-03-28 Thread Steve Poe
Greg Stark wrote: "Merlin Moncure" <[EMAIL PROTECTED]> writes: Alex wrote: Without starting too much controvesy I hope, I would seriously recommend you evaluate the AMCC Escalade 9500S SATA controller. . At the risk of shaming myself with another 'me too' post, I'd like to say t

Re: [PERFORM] which dual-CPU hardware/OS is fastest for PostgreSQL?

2005-03-28 Thread Greg Stark
"Merlin Moncure" <[EMAIL PROTECTED]> writes: > Alex wrote: > > Without starting too much controvesy I hope, I would seriously > > recommend you evaluate the AMCC Escalade 9500S SATA controller. ... > At the risk of shaming myself with another 'me too' post, I'd like to > say that my experiences

Re: [PERFORM] Query Optimizer Failure / Possible Bug

2005-03-28 Thread Josh Berkus
Hannes, > The query and the corresponding EXPLAIN is at > > http://hannes.imos.net/query.txt The problem is that you're using a complex corellated sub-select in the SELECT clause: SELECT d.delivery_id, da.article_no, da.amount, ( SELECT COUNT(*)

Re: [PERFORM] Delete query takes exorbitant amount of time

2005-03-28 Thread Simon Riggs
On Mon, 2005-03-28 at 09:37 -0700, Karim A Nassar wrote: > On Mon, 28 Mar 2005, Stephan Szabo wrote: > > > On Mon, 28 Mar 2005, Simon Riggs wrote: > > > > run the EXPLAIN after doing > > > > SET enable_seqscan = off > > ... > > > I think you have to prepare with enable_seqscan=off, becaus

Re: [PERFORM] Sluggish server performance

2005-03-28 Thread Joshua D. Drake
On Mon, 2005-03-28 at 10:20 -0800, Patrick Hatcher wrote: > > > > Pg: 7.4.5 > RH 7.3 > Raid 0+1 (200G 15k RPM) > Quad Xeon > 8G ram > > 95% Read-only > 5% - read-write > > I'm experiencing extreme load issues on my machine anytime I have more than > 40 users connected to the database. The m

Re: [PERFORM] Sluggish server performance

2005-03-28 Thread Jacques Caron
Hi, At 20:20 28/03/2005, Patrick Hatcher wrote: I'm experiencing extreme load issues on my machine anytime I have more than 40 users connected to the database. The majority of the users appear to be in an idle state according TOP, but if more than3 or more queries are ran the system slows to a cra

[PERFORM] Sluggish server performance

2005-03-28 Thread Patrick Hatcher
Pg: 7.4.5 RH 7.3 Raid 0+1 (200G 15k RPM) Quad Xeon 8G ram 95% Read-only 5% - read-write I'm experiencing extreme load issues on my machine anytime I have more than 40 users connected to the database. The majority of the users appear to be in an idle state according TOP, but if more than3 o

Re: [PERFORM] Delete query takes exorbitant amount of time

2005-03-28 Thread Mark Lewis
Tom Lane Wrote: > Hmm ... I wonder how hard it would be to teach EXPLAIN ANALYZE to show > the runtime expended in each trigger when the statement is of a kind > that has triggers. We couldn't break down the time *within* the > triggers, but even this info would help a lot in terms of finger > poi

Re: [PERFORM] Delete query takes exorbitant amount of time

2005-03-28 Thread Stephan Szabo
On Mon, 28 Mar 2005, Karim A Nassar wrote: > On Mon, 28 Mar 2005, Simon Riggs wrote: > > run the EXPLAIN after doing > > SET enable_seqscan = off > > The results I previously supplied were searching for a non-existent > value, so I have provided output for both cases. > > *** > *** Searching f

Re: [PERFORM] Configuration/Tuning of server/DB

2005-03-28 Thread Thomas F . O'Connell
Reid, There are a few very valuable tuning documents that are part of the established PostgreSQL-related literature. You don't mention which version of postgres you'll be running, but here are the documents you'll find useful: postgresql.conf 7.4: http://www.varlena.com/varlena/GeneralBits

[PERFORM] NFS RAID 0/5

2005-03-28 Thread Rudi Starcevic
Hi, I have a web app using PostgreSQL which indexes, searches and streams/downloads online movies. I think I have a problem with NFS and RAID, it is not strictly PostgreSQL but closely linked and I know many people on this list are experienced with this technology. Apologies if it is off topic.

Re: [PERFORM] Delete query takes exorbitant amount of time

2005-03-28 Thread Simon Riggs
On Sun, 2005-03-27 at 07:05 -0800, Stephan Szabo wrote: > On Sat, 26 Mar 2005, Karim Nassar wrote: > > Some improvement. Even better once it's cached. Row estimate didn't > > change. Is this the best I can expect? Is there any other optimizations > > I am missing? > > I'm not sure, really. Running