Re: [PERFORM] Using LIMIT changes index used by planner

2004-12-13 Thread Andrew McMillan
On Mon, 2004-12-13 at 01:13 -0500, Sven Willenberger wrote: I have a question regarding a serious performance hit taken when using a LIMIT clause. I am using version 7.4.6 on FreeBSD 4.10-STABLE with 2GB of memory. The table in question contains some 25 million rows with a bigserial primary

Re: [PERFORM] Hardware purchase question

2004-12-13 Thread Vivek Khera
BS == Bo Stewart [EMAIL PROTECTED] writes: BS The servers listed above are the dell 2650's which have perc 3 BS controllers. I have seen on this list where they are know for not BS performing well. So any suggestions for an attached scsi device would BS be greatly appreciated. Also, any

Re: [PERFORM] INSERT question

2004-12-13 Thread Bruno Wolff III
On Mon, Dec 13, 2004 at 08:28:39 -0800, sarlav kumar [EMAIL PROTECTED] wrote: Is there a way to write the INSERT as follows? INSERT into merchant_buyer_country (merchant_id,country,enabled,group_id) values (1203, (SELECT code FROM country WHERE send IS NOT NULL OR receive IS NOT

Re: [PERFORM] Alternatives to Dell?

2004-12-13 Thread Vivek Khera
FW == Frank Wiles [EMAIL PROTECTED] writes: FW I believe I had expressed some problems with Dell in the past, but FW it really isn't a quality control issue that I have seen. It is more FW of a Linux support issue. Lately I've been running into problems with Ditto that experience, but

Re: [PERFORM] Alternatives to Dell?

2004-12-13 Thread Bruce Momjian
Vivek Khera wrote: FW == Frank Wiles [EMAIL PROTECTED] writes: FW I believe I had expressed some problems with Dell in the past, but FW it really isn't a quality control issue that I have seen. It is more FW of a Linux support issue. Lately I've been running into problems with

Re: [PERFORM] pg_restore taking 4 hours!

2004-12-13 Thread Josh Berkus
Vivek, The biggest improvement in speed to restore time I have discovered is to increase the checkpoint segments.  I bump mine to about 50.  And moving the pg_xlog to a separate physical disk helps a lot there, too. Don't leave it at 50; if you have the space on your log array, bump it up to

Re: [PERFORM] INSERT question

2004-12-13 Thread sarlav kumar
Thanks guys!! that worked!:) Michael Adler [EMAIL PROTECTED] wrote: On Mon, Dec 13, 2004 at 08:28:39AM -0800, sarlav kumar wrote: INSERT into merchant_buyer_country (merchant_id,country,enabled,group_id) values (1203, (SELECT code FROM country WHERE send IS NOT NULL OR receive IS NOT NULL),

Re: [PERFORM] Hardware purchase question

2004-12-13 Thread Josh Berkus
Vivek, Dual Xeon 64bit with built-in 6-disk RAID10 or RAID5 (LSI RAID card) Dual Opteron 64bit with built-in 6-disk RAID10 or RAID5 (LSI RAID card) Dual Opteron 64bit with external RAID via fibre channel (eg, nstor) Opteron over Xeon, no question.Not only are the Opterons

Re: [PERFORM] Using LIMIT changes index used by planner

2004-12-13 Thread Sven Willenberger
Andrew McMillan wrote: On Mon, 2004-12-13 at 01:13 -0500, Sven Willenberger wrote: I have a question regarding a serious performance hit taken when using a LIMIT clause. I am using version 7.4.6 on FreeBSD 4.10-STABLE with 2GB of memory. The table in question contains some 25 million rows with

Re: [PERFORM] Using LIMIT changes index used by planner

2004-12-13 Thread Tom Lane
Sven Willenberger [EMAIL PROTECTED] writes: explain analyze select storelocation,order_number from custacct where referrer = 1365 and orderdate between '2004-12-07' and '2004-12-07 12:00:00' order by custacctid limit 10; QUERY PLAN

Re: [PERFORM] Off-list Re: Alternatives to Dell?

2004-12-13 Thread Vivek Khera
JB == Josh Berkus [EMAIL PROTECTED] writes: FYI ... the 750s, 1850s and 2850s use Intel chipsets (E7520 on 1850s and 2850s, 7210 on 750s), Intel NICs, and come only with LSI Logic RAID controllers. It looks like Dell has dropped the Broadcom/ServerWorks and Adaptec junk. JB I don't know

[PERFORM] INSERT question

2004-12-13 Thread sarlav kumar
Hi All, I have a question regarding multiple inserts. The following function inserts for each country found in country table, values into merchant_buyer_country.

Re: [PERFORM] pg_restore taking 4 hours!

2004-12-13 Thread Vivek Khera
RC == Rodrigo Carvalhaes [EMAIL PROTECTED] writes: RC Hi! RC I am using PostgreSQL with a proprietary ERP software in Brazil. The RC database have around 1.600 tables (each one with +/- 50 columns). RC My problem now is the time that takes to restore a dump. My customer RC database have arount

Re: [PERFORM] pg_restore taking 4 hours!

2004-12-13 Thread Tom Lane
Josh Berkus [EMAIL PROTECTED] writes: Not as much, but it's still a good idea to serialize the load. With too few segments, you get a pattern like: Fill up segments Write to database Recycle segments Fill up segments Write to database Recycle segments etc. Actually I think the

Re: [PERFORM] Hardware purchase question

2004-12-13 Thread Joshua D. Drake
However, I keep getting conflicting advice. My choices are along these lines: Dual Xeon 64bit with built-in 6-disk RAID10 or RAID5 (LSI RAID card) Dual Opteron 64bit with built-in 6-disk RAID10 or RAID5 (LSI RAID card) Dual Opteron 64bit with external RAID via fibre channel (eg, nstor) An

Re: [PERFORM] Similar tables, different indexes performance

2004-12-13 Thread Bruno Wolff III
On Mon, Dec 13, 2004 at 17:32:02 -0200, Alvaro Nunes Melo [EMAIL PROTECTED] wrote: Em Seg, 2004-12-13 às 16:03, Bruno Wolff III escreveu: On Mon, Dec 13, 2004 at 15:17:49 -0200, Alvaro Nunes Melo [EMAIL PROTECTED] wrote: db= SELECT COUNT(*) FROM titulo WHERE cd_pessoa = 1; count

Re: [PERFORM] Trying to create multi db query in one large querie

2004-12-13 Thread Spiegelberg, Greg
Hello, My experience with dblink() is that each dblink() is executed serially, in part I would guess, due to the plan for the query. To have each query run in parallel you would need to execute both dblink()'s simultaneously saving each result into a table. I'm not sure if the same table could

Re: [PERFORM] Trying to create multi db query in one large querie

2004-12-13 Thread Joe Conway
Spiegelberg, Greg wrote: My experience with dblink() is that each dblink() is executed serially Correct. If you really want to do multiple queries simultaneously, you would need to write a function very similar to dblink_record, but using asynchonous libpq calls to both remote hosts. See:

Re: [PERFORM] Trying to create multi db query in one large queries

2004-12-13 Thread Josh Berkus
Hasnul, My question is if there is a query design that would query multiple server simultaneously.. would that improve the performance? Not without a vast amounts of infrastructure coding. You're basically talking about what Oracle has spent the last 3 years and $100 million working on.