[PERFORM] [PERFORMANCE] how to set wal_buffers

2009-08-20 Thread Jeff Janes
> -- Forwarded message -- > From: Jaime Casanova > To: psql performance list > Date: Wed, 19 Aug 2009 19:25:11 -0500 > Subject: [PERFORMANCE] how to set wal_buffers > Hi, > > Our fine manual says: > """ > The amount of memory used in shared memory for WAL data. The default > is 64

Re: [PERFORM] number of rows estimation for bit-AND operation

2009-08-20 Thread Slava Moudry
Hi, Yes, I thought about putting the bit-flags in separate fields. Unfortunately - I expect to have quite a lot of these and space is an issue when you are dealing with billions of records in fact table, so I prefer to pack them into one int8. For users it's also much easier to write "where mt_fl

Re: [PERFORM] number of rows estimation for bit-AND operation

2009-08-20 Thread Scott Marlowe
On Thu, Aug 20, 2009 at 7:32 PM, Scott Marlowe wrote: > 2009/8/20 Slava Moudry : >> Hi, >> Yes, I thought about putting the bit-flags in separate fields. >> Unfortunately - I expect to have quite a lot of these and space is an issue >> when you are dealing with billions of records in fact table, s

[PERFORM] limiting results makes the query slower

2009-08-20 Thread Jaime Casanova
Hi, in a web app we have a query that we want to show in limited results at a time, this one executes in 10 seconds if i use limit but executes in 300ms if i remove it. why is that happening? the query is using and index for avoiding the sort so the nestloop should go only for the first 20 records

Re: [PERFORM] improving my query plan

2009-08-20 Thread Scott Carey
On 8/20/09 4:09 PM, "Kevin Kempter" wrote: > Hi all; > > > I have a simple query against two very large tables ( > 800million rows in > theurl_hits_category_jt table and 9.2 million in the url_hits_klk1 table ) > > > I have indexes on the join columns and I've run an explain. > also I've s

Re: [PERFORM] number of rows estimation for bit-AND operation

2009-08-20 Thread Scott Marlowe
2009/8/20 Slava Moudry : > Hi, > Yes, I thought about putting the bit-flags in separate fields. > Unfortunately - I expect to have quite a lot of these and space is an issue > when you are dealing with billions of records in fact table, so I prefer to > pack them into one int8. For giggles I cre

Re: [PERFORM] improving my query plan

2009-08-20 Thread Chris
Kevin Kempter wrote: Hi all; I have a simple query against two very large tables ( > 800million rows in theurl_hits_category_jt table and 9.2 million in the url_hits_klk1 table ) I have indexes on the join columns and I've run an explain. also I've set the default statistics to 250 for bot

Re: [PERFORM] Number of tables

2009-08-20 Thread Greg Stark
On Fri, Aug 21, 2009 at 1:38 AM, Alvaro Herrera wrote: > Greg Stark wrote: > >> It would be nice to have a solution to that where you could create >> lightweight temporary objects which belong to an "application session" >> which can be picked up by a different database connection each go >> around

Re: [PERFORM] Number of tables

2009-08-20 Thread Alvaro Herrera
Greg Stark wrote: > It would be nice to have a solution to that where you could create > lightweight temporary objects which belong to an "application session" > which can be picked up by a different database connection each go > around. It would be useful: CREATE SCHEMA session1234 UNLOGGED C

Re: [PERFORM] Number of tables

2009-08-20 Thread Greg Stark
On Thu, Aug 20, 2009 at 11:18 PM, Craig James wrote: > Greg Stark wrote: >> >> What you want is a multi-column primary key where userid is part of >> the key. You don't want to have a separate table for each user unless >> each user has their own unique set of columns. > Not always true. ... > The

[PERFORM] improving my query plan

2009-08-20 Thread Kevin Kempter
Hi all; I have a simple query against two very large tables ( > 800million rows in theurl_hits_category_jt table and 9.2 million in the url_hits_klk1 table ) I have indexes on the join columns and I've run an explain. also I've set the default statistics to 250 for both join columns. I get a v

Re: [PERFORM] Number of tables

2009-08-20 Thread Craig James
Greg Stark wrote: What you want is a multi-column primary key where userid is part of the key. You don't want to have a separate table for each user unless each user has their own unique set of columns. Not always true. When the user logs back in, a hidden part of the login process gets a tab

Re: [PERFORM] Number of tables

2009-08-20 Thread Greg Stark
On Thu, Aug 20, 2009 at 9:16 PM, Craig James wrote: > Fabio La Farcioli wrote: >> >> i am developing a web app for thousands users (1.000/2.000). >> >> Each user have a 2 table of work...I finally have 2.000 (users) x 2 tables >> = 4.000 tables! >> >> Postgres support an elevate number of tables??

Re: [PERFORM] Number of tables

2009-08-20 Thread Craig James
Fabio La Farcioli wrote: i am developing a web app for thousands users (1.000/2.000). Each user have a 2 table of work...I finally have 2.000 (users) x 2 tables = 4.000 tables! Postgres support an elevate number of tables?? i have problem of performance ??? We have run databases with over 1

Re: [PERFORM] number of rows estimation for bit-AND operation

2009-08-20 Thread Robert Haas
On Tue, Aug 18, 2009 at 6:34 PM, Scott Marlowe wrote: > 2009/8/18 Slava Moudry : >>> increase default stats target, analyze, try again. >> This field has only 5 values. I had put values/frequencies in my first post. > > Sorry, kinda missed that.  Anyway, there's no way for pg to know which > operat

Re: [PERFORM] PG 8.3 and server load

2009-08-20 Thread Ivan Voras
Scott Marlowe wrote: On Wed, Aug 19, 2009 at 9:40 AM, Phoenix Kiula wrote: On Wed, Aug 19, 2009 at 11:37 PM, Andy Colson wrote: Phoenix: run top again, and hit the '1' key. It'll show you stats for each cpu. Is one pegged and the others idle? top - 10:38:53 up 29 days, 5 min, 1 user, loa

Re: [PERFORM] Query tuning

2009-08-20 Thread Віталій Тимчишин
2009/8/19 Kevin Kempter > > We do have an index on url_hits.time > > not sure why timestamps were not used, I was not here for the design phase. > What's type of time column? I don't like it casts it to double in explain. If it is integer, may be you need to change and time >= extract ('epoch'

Re: [PERFORM] Number of tables

2009-08-20 Thread Fabio La Farcioli
Craig Ringer ha scritto: On Thu, 2009-08-20 at 09:01 +0200, Fabio La Farcioli wrote: Each user have a 2 table of work...I finally have 2.000 (users) x 2 tables = 4.000 tables! Hmm, ok. Does each user really need two tables each? Why? Does the set of tables for each user have a different stru

Re: [PERFORM] Number of tables

2009-08-20 Thread Craig Ringer
On Thu, 2009-08-20 at 09:01 +0200, Fabio La Farcioli wrote: > Each user have a 2 table of work...I finally have 2.000 (users) x 2 > tables = 4.000 tables! Hmm, ok. Does each user really need two tables each? Why? Does the set of tables for each user have a different structure? Or are you separa

Re: [PERFORM] Number of tables

2009-08-20 Thread Jochen Erwied
Thursday, August 20, 2009, 9:01:30 AM you wrote: > i am developing a web app for thousands users (1.000/2.000). > Each user have a 2 table of work...I finally have 2.000 (users) x 2 > tables = 4.000 tables! If all tables are created equal, I would rethink the design. Instead of using 2 tables p

[PERFORM] Number of tables

2009-08-20 Thread Fabio La Farcioli
Hi to all, i am developing a web app for thousands users (1.000/2.000). Each user have a 2 table of work...I finally have 2.000 (users) x 2 tables = 4.000 tables! Postgres support an elevate number of tables?? i have problem of performance ??? Thanks Sorry for my english -- Sent via pgsql