Re: [PERFORM] Data type to use for primary key

2004-11-22 Thread Josh Berkus
Rod, > It would be nice if PostgreSQL had some form of transparent surrogate > keying in the background which would automatically run around and > replace your real data with SERIAL integers. It could use a lookup table > for conversions between the surrogate and real values so the user never > kn

Re: [PERFORM] [pgsql-hackers-win32] scalability issues on win32

2004-11-22 Thread Bruce Momjian
This was an intersting Win32/linux comparison. I expected Linux to scale better, but I was surprised how poorly XP scaled. It reinforces our perception that Win32 is for low traffic servers. --- Merlin Moncure wrote: > Foll

Re: [PERFORM] memcached and PostgreSQL

2004-11-22 Thread Bruce Momjian
Pierre-Frédéric Caillaud wrote: > > > While an exception, this is a very real possibility in day to day > > operations. The absence of any feedback or balancing mechanism between > > the database and cache makes it impossible to know that they are in sync > > and even a small error percentag

Re: [PERFORM] Data type to use for primary key

2004-11-22 Thread Rod Taylor
On Mon, 2004-11-22 at 16:54 -0800, Josh Berkus wrote: > Alexandre, > > > What is the common approach? Should I use directly the product_code as > > my ID, or use a sequantial number for speed? (I did the same for the > > company_id, this is a 'serial' and not the shor name of the customer. > > I j

Re: [PERFORM] Data type to use for primary key

2004-11-22 Thread Josh Berkus
Alexandre, > What is the common approach? Should I use directly the product_code as > my ID, or use a sequantial number for speed? (I did the same for the > company_id, this is a 'serial' and not the shor name of the customer. > I just don't know what is usually done. Don't use SERIAL just becaus

Re: [PERFORM] scalability issues on win32

2004-11-22 Thread Pierre-Frédéric Caillaud
Test platform: Pentium 4 3.06 GHz/HT 10k SATA Raptor 1Gb memory Windows XP Pro SP2/Redhat Fedora 3 (64 bit results coming soon) Could you please add information about... - filesystems ? - windows configured as "network server" or as "desktop box" ? - virtual memory In my experience you MUST d

Re: [PERFORM] Data type to use for primary key

2004-11-22 Thread Alexandre Leclerc
Mr Caillaud, Merci! Many points you bring were also my toughts. I was asking myself really this was the way to go. I'm happy to see that my view of the problem was good. Encore merci! (Thanks again!) On Tue, 23 Nov 2004 00:06:13 +0100, Pierre-Frédéric Caillaud <[EMAIL PROTECTED]> wrote: > > > W

Re: [PERFORM] Data type to use for primary key

2004-11-22 Thread Pierre-Frédéric Caillaud
What is the common approach? Should I use directly the product_code as my ID, or use a sequantial number for speed? (I did the same for the company_id, this is a 'serial' and not the shor name of the customer. I just don't know what is usually done. Use a serial : - you can change product_code f

[PERFORM] scalability issues on win32

2004-11-22 Thread Merlin Moncure
Following is the promised writeup in performance related issues comparing win32 with linux x86 and linux x86-64. Unfortunately, the 64 bit portion of the test is not yet completed and won't be for a bit. However there are some telling things about the win32/linux comparison. If you are considering

Re: [PERFORM] Slow execution time when querying view with WHERE clause

2004-11-22 Thread Mike Mascari
Mike Mascari wrote: I have the following view: create or replace view market.p_areas as select a.* from _areas a where a.area in ( select b.area from _bins b, _inventories i, _offers o, _pricemembers p where b.bin = i.bin and i.inventory = o.inventory and o.pricegroup = p.pricegroup and p.buy

[PERFORM] Slow execution time when querying view with WHERE clause

2004-11-22 Thread Mike Mascari
I have the following view: create or replace view market.p_areas as select a.* from _areas a where a.area in ( select b.area from _bins b, _inventories i, _offers o, _pricemembers p where b.bin = i.bin and i.inventory = o.inventory and o.pricegroup = p.pricegroup and p.buyer in ( select s.s

[PERFORM] Data type to use for primary key

2004-11-22 Thread Alexandre Leclerc
Good day, I'm asking myself if there is a performance issue in using an integer of varchar(24) PRIMARY KEY in a product table. I've read that there is no speed issue in the query, but that the only performance issue is the database size of copying the key in other tables that require it. My prod

Re: [PERFORM] help needed -- sequential scan problem

2004-11-22 Thread sarlav kumar
Hi Josh,   Can you tell me in what way it affects performance? And How do I decide what value to set for the random_page_cost? Does it depend on any  other factors?   Thanks, SaranyaJosh Berkus <[EMAIL PROTECTED]> wrote: Sarlav,> I am sorry, I am not aware of what random_page_cost is, as I am new t

Re: [PERFORM] help needed -- sequential scan problem

2004-11-22 Thread Josh Berkus
Sarlav, > I am sorry, I am not aware of what random_page_cost is, as I am new to > Postgres. What does it signify and how do I reduce random_page_cost? It's a parameter in your postgresql.conf file.After you test it, you will want to change it there and reload the server (pg_ctl reload). Ho

Re: [PERFORM] help needed -- sequential scan problem

2004-11-22 Thread gnari
From: "sarlav kumar" <[EMAIL PROTECTED]> > [Tom:] > >You might get some results from increasing the > >statistics target for merchant_purchase.merchant_id. > > Do I have to use vacuum analyze to update the statistics? If so, I have already tried that and it doesn't seem to help. alter table mer

Re: [PERFORM] help needed -- sequential scan problem

2004-11-22 Thread sarlav kumar
Hi Tom,   Thanks for the help, Tom.   >The major issue seems to be in the sub-selects:> -> Seq Scan on merchant_purchase mp (cost=0.00..95.39 rows=44 width=4) (actual time=2.37..2.58 rows=6 loops=619)> Filter: (merchant_id = $0)>where the estimated row count is a factor of 7 too high. If the>estima

Re: [PERFORM] Query Performance and IOWait

2004-11-22 Thread Anjan Dave
Check the linux-dell list for more...The PERC3/Di cards are specifically Adaptec, not most. PERC4/DC is LSI Megaraid. Unless you buy the cheaper version, most will come with battery. -anjan -Original Message- From: Andrew Janian [mailto:[EMAIL PROTECTED] Sent: Friday, November 19, 2004

Re: [PERFORM] Index usage for sorted query

2004-11-22 Thread Markus Schaber
Hi, Pierre-Frédéric, On Sat, 20 Nov 2004 17:12:43 +0100 Pierre-Frédéric Caillaud <[EMAIL PROTECTED]> wrote: > > WHERE cd='ca' ORDER BY l_postcode; > > Write : > > > WHERE cd='ca' ORDER BY cd, l_postcode; > > You have a multicolumn index, so you should specify a multicolumn sort > exactly the

Re: [PERFORM] memcached and PostgreSQL

2004-11-22 Thread Pierre-Frédéric Caillaud
While an exception, this is a very real possibility in day to day operations. The absence of any feedback or balancing mechanism between the database and cache makes it impossible to know that they are in sync and even a small error percentage multiplied over time will lead to an ever incr

Re: [PERFORM] memcached and PostgreSQL

2004-11-22 Thread Patrick B Kelly
On Nov 21, 2004, at 11:55 PM, Sean Chittenden wrote: This is similar to sending email in a trigger or on commit where you can't be certain you send email always and only on a commit. While this is certainly a possibility, it's definitely closer to the exception and not the normal instance. While