[PERFORM] Improve the Postgres Query performance

2011-06-21 Thread Tripura
Hello All.. This is my first PostgreSql database. It has 8 tables and 4 tables are very huge each with 6million records. I have a simple view on this tables and it is taking more than 3hrs to return the results. Can someone help me the way to improve the db return the results in a faster way. I am

Re: [PERFORM] Contemplating SSD Hardware RAID

2011-06-21 Thread Greg Smith
On 06/21/2011 05:35 PM, Merlin Moncure wrote: On Tue, Jun 21, 2011 at 3:32 PM, Scott Marlowe wrote: On Tue, Jun 21, 2011 at 2:25 PM, Yeb Havinga wrote: It's too bad however that OCZ doesn't let the user choose which firmware to run (the tool always picks the newest), so after every

Re: [PERFORM] Contemplating SSD Hardware RAID

2011-06-21 Thread Merlin Moncure
On Tue, Jun 21, 2011 at 3:32 PM, Scott Marlowe wrote: > On Tue, Jun 21, 2011 at 2:25 PM, Yeb Havinga wrote: > >> strange values mean. It's too bad however that OCZ doesn't let the user >> choose which firmware to run (the tool always picks the newest), so after >> every upgrade it'll be a surpris

Re: [PERFORM] Contemplating SSD Hardware RAID

2011-06-21 Thread Scott Marlowe
On Tue, Jun 21, 2011 at 2:25 PM, Yeb Havinga wrote: > strange values mean. It's too bad however that OCZ doesn't let the user > choose which firmware to run (the tool always picks the newest), so after > every upgrade it'll be a surprise what values are supported or if any of the That right ther

Re: [PERFORM] Contemplating SSD Hardware RAID

2011-06-21 Thread Yeb Havinga
On 2011-06-21 22:10, Yeb Havinga wrote: There's some info burried in http://archives.postgresql.org/pgsql-performance/2011-03/msg00350.php where two Vertex 2 pro's are compared; the first has been really hammered with pgbench, the second had a few months duty in a workstation. The raw value

Re: [PERFORM] Contemplating SSD Hardware RAID

2011-06-21 Thread Yeb Havinga
On 2011-06-21 17:11, Greg Smith wrote: On 06/21/2011 07:19 AM, Florian Weimer wrote: 3ware controllers offer SMART pass-through, and smartctl supports it. I'm sure there's something similar for Areca controllers. Depends on the model, drives, and how you access the management interface. For

Re: [PERFORM] seq scan in the case of max() on the primary key column

2011-06-21 Thread Shaun Thomas
On 06/17/2011 03:31 PM, Jim Nasby wrote: c_parent_oid CONSTANT oid := (p_parent_schema || '.' || p_parent_table )::regclass; Well isn't *that* a handy bit of magic. How did I not know about that? Thanks! -- Shaun Thomas OptionsHouse | 141 W. Jackson Blvd. | Suite 800 | Chicago IL, 60604 312

Re: [PERFORM] Contemplating SSD Hardware RAID

2011-06-21 Thread Anton Rommerskirchen
Am Dienstag, 21. Juni 2011 05:54:26 schrieb Dan Harris: > I'm looking for advice from the I/O gurus who have been in the SSD game > for a while now. > > I understand that the majority of consumer grade SSD drives lack the > required capacitor to complete a write on a sudden power loss. But, > what

Re: [PERFORM] Contemplating SSD Hardware RAID

2011-06-21 Thread Greg Smith
On 06/21/2011 07:19 AM, Florian Weimer wrote: 3ware controllers offer SMART pass-through, and smartctl supports it. I'm sure there's something similar for Areca controllers. Depends on the model, drives, and how you access the management interface. For both manufacturers actually. Check

Re: [PERFORM] Contemplating SSD Hardware RAID

2011-06-21 Thread Florian Weimer
* Yeb Havinga: > I forgot to mention that with an SSD it's important to watch the > remaining lifetime. These values can be read with smartctl. When > putting the disk behind a hardware raid controller, you might not be > able to read them from the OS, and the hardware RAID firmware might be > to

Re: [PERFORM] Inoptimal query plan for max() and multicolumn index

2011-06-21 Thread F. BROUARD / SQLpro
Le 20/06/2011 18:08, Vladimir Kulev a écrit : Yes, exactly :) SQL Server does it but PG does not. Expect this for the future So try to rewrite the query like this : select max(timestamp) from sms where number = '5502712' UNIUON ALL, select max(timestamp) from sms where number = '5802693'

Re: [PERFORM] Contemplating SSD Hardware RAID

2011-06-21 Thread Yeb Havinga
On 2011-06-21 09:51, Yeb Havinga wrote: On 2011-06-21 08:33, Greg Smith wrote: On 06/20/2011 11:54 PM, Dan Harris wrote: I'm exploring the combination of an Areca 1880ix-12 controller with 6x OCZ Vertex 3 V3LT-25SAT3 2.5" 240GB SATA III drives in RAID-10. Has anyone tried this combination?

Re: [PERFORM] Contemplating SSD Hardware RAID

2011-06-21 Thread Yeb Havinga
On 2011-06-21 08:33, Greg Smith wrote: On 06/20/2011 11:54 PM, Dan Harris wrote: I'm exploring the combination of an Areca 1880ix-12 controller with 6x OCZ Vertex 3 V3LT-25SAT3 2.5" 240GB SATA III drives in RAID-10. Has anyone tried this combination? What nasty surprise am I overlooking her

Re: [PERFORM] Inoptimal query plan for max() and multicolumn index

2011-06-21 Thread Vladimir Kulev
Yes, exactly :) On Mon, Jun 20, 2011 at 7:41 PM, Kevin Grittner wrote: > I expect you're hoping for a plan similar to what this gives you?: > > explain analyze select greatest( >  (select max(timestamp) from sms where number = '5502712'), >  (select max(timestamp) from sms where number = '5802693