Re: [PERFORM] Optimizing a VIEW

2008-08-22 Thread Decibel!
On Aug 20, 2008, at 1:18 PM, Tom Lane wrote: If you're worried about storage space, I wouldn't go for arrays of composite :-(. The tuple header overhead is horrendous, almost certainly a lot worse than hstore. Oh holy cow, I didn't realize we had a big header in there. Is that to allow for

Re: [PERFORM] Optimizing a VIEW

2008-08-20 Thread Decibel!
On Aug 16, 2008, at 9:19 PM, Gurjeet Singh wrote: For you very specific case, I recommend you check out contrib/hstore: http://www.postgresql.org/docs/current/static/hstore.html Awesome Any comments on the performance of hstore? I've looked at it but haven't actually used it. One thing I

Re: [PERFORM] Optimizing a VIEW

2008-08-20 Thread Decibel!
On Aug 17, 2008, at 10:21 AM, Madison Kelly wrote: Truth be told, I sort of expected this would be what I had to do. I think I asked this more in hoping that there might be some magic I didn't know about, but I see now that's not the case. :) As my data points grow to 500,000+, the time it

Re: [PERFORM] Optimizing a VIEW

2008-08-20 Thread Tom Lane
Decibel! [EMAIL PROTECTED] writes: On Aug 16, 2008, at 9:19 PM, Gurjeet Singh wrote: Awesome Any comments on the performance of hstore? I've looked at it but haven't actually used it. One thing I wish it did was to keep a catalog somewhere of the names that it's seen so that it

Re: [PERFORM] Optimizing a VIEW

2008-08-18 Thread Matthew Wakeling
On Fri, 15 Aug 2008, Madison Kelly wrote: Below I will post the VIEW and a sample of the query's EXPLAIN ANALYZE. Thanks for any tips/help/clue-stick-beating you may be able to share! This query looks incredibly expensive: SELECT ... FROM customer a,

Re: [PERFORM] Optimizing a VIEW

2008-08-17 Thread Madison Kelly
Decibel! wrote: On Aug 15, 2008, at 1:36 PM, Madison Kelly wrote: The 'cust_id' references the customer that the given data belongs to. The reason for this data bucket (does this structure have a proper name?) is that the data I need to store on a give customer is quite variable and outside

Re: [PERFORM] Optimizing a VIEW

2008-08-16 Thread Decibel!
On Aug 15, 2008, at 1:36 PM, Madison Kelly wrote: The 'cust_id' references the customer that the given data belongs to. The reason for this data bucket (does this structure have a proper name?) is that the data I need to store on a give customer is quite variable and outside of my control.

Re: [PERFORM] Optimizing a VIEW

2008-08-16 Thread Rodrigo E. De León Plicet
On Sat, Aug 16, 2008 at 2:19 PM, Decibel! [EMAIL PROTECTED] wrote: You need to trim down your EAV table. Egads! I'd say completely get rid of this beast and redesign it according to valid relational concepts. This post pretty much explains the whole issue with EAV:

Re: [PERFORM] Optimizing a VIEW

2008-08-16 Thread Rodrigo E. De León Plicet
On Fri, Aug 15, 2008 at 1:36 PM, Madison Kelly [EMAIL PROTECTED] wrote: The 'cust_id' references the customer that the given data belongs to. The reason for this data bucket (does this structure have a proper name?) is that the data I need to store on a give customer is quite variable and

Re: [PERFORM] Optimizing a VIEW

2008-08-16 Thread Gurjeet Singh
On Sun, Aug 17, 2008 at 7:06 AM, Rodrigo E. De León Plicet [EMAIL PROTECTED] wrote: On Fri, Aug 15, 2008 at 1:36 PM, Madison Kelly [EMAIL PROTECTED] wrote: The 'cust_id' references the customer that the given data belongs to. The reason for this data bucket (does this structure have a

[PERFORM] Optimizing a VIEW

2008-08-15 Thread Madison Kelly
Hi all, I've got a simple table with a lot of data in it: CREATE TABLE customer_data ( cd_id int primary key default(nextval('cd_seq')), cd_cust_id int not null, cd_variable textnot