Re: [PERFORM] What exactly is postgres doing during INSERT/UPDATE ?

2009-08-29 Thread Greg Stark
On Sat, Aug 29, 2009 at 5:20 AM, Luke Koopsluke.ko...@entrust.com wrote: Joseph S Wrote If I have 14 drives in a RAID 10 to split between data tables and indexes what would be the best way to allocate the drives for performance? RAID-5 can be much faster than RAID-10 for random reads and

Re: [PERFORM] What exactly is postgres doing during INSERT/UPDATE ?

2009-08-29 Thread Merlin Moncure
On Fri, Aug 28, 2009 at 8:19 PM, Jeff Janesjeff.ja...@gmail.com wrote: -- Forwarded message -- From: Joseph S j...@selectacast.net To: Greg Smith gsm...@gregsmith.com, pgsql-performance@postgresql.org Date: Fri, 28 Aug 2009 10:25:10 -0400 Subject: Re: What exactly is postgres

Re: [PERFORM] What exactly is postgres doing during INSERT/UPDATE ?

2009-08-29 Thread Scott Marlowe
On Sat, Aug 29, 2009 at 2:46 AM, Greg Starkgsst...@mit.edu wrote: On Sat, Aug 29, 2009 at 5:20 AM, Luke Koopsluke.ko...@entrust.com wrote: Joseph S Wrote If I have 14 drives in a RAID 10 to split between data tables and indexes what would be the best way to allocate the drives for

Re: [PERFORM] PostgreSQL does CAST implicitely between int and a domain derived from int

2009-08-29 Thread Bruce Momjian
Jean-Michel Pour? wrote: -- Start of PGP signed section. Le jeudi 27 ao?t 2009 ? 14:05 -0400, Tom Lane a ?crit : tom lane Dear Tom, Why is the query planner displaying ::integer What does it mean? ::integer casts a data type to INTEGER. It is the same as CAST(). -- Bruce Momjian

Re: [PERFORM] PostgreSQL does CAST implicitely between int and a domain derived from int

2009-08-29 Thread Jean-Michel Pouré
Le samedi 29 août 2009 à 11:16 -0400, Bruce Momjian a écrit : Why is the query planner displaying ::integer What does it mean? ::integer casts a data type to INTEGER. It is the same as CAST(). In Drupal database, we have two types: integer int_unsigned CREATE DOMAIN int_unsigned AS

Re: [PERFORM] PostgreSQL does CAST implicitely between int and a domain derived from int

2009-08-29 Thread Tom Lane
Jean-Michel =?ISO-8859-1?Q?Pour=E9?= j...@poure.com writes: In Drupal database, we have two types: CREATE DOMAIN int_unsigned AS integer CONSTRAINT int_unsigned_check CHECK ((VALUE = 0)); Why do queries cast between integer and int_unsigned? That domain doesn't have any operators of its

Re: [PERFORM] What exactly is postgres doing during INSERT/UPDATE ?

2009-08-29 Thread David Rees
On Sat, Aug 29, 2009 at 1:46 AM, Greg Starkgsst...@mit.edu wrote: On Sat, Aug 29, 2009 at 5:20 AM, Luke Koopsluke.ko...@entrust.com wrote: RAID-5 can be much faster than RAID-10 for random reads and writes.  It is much slower than RAID-10 for sequential writes, but about the same for

Re: [PERFORM] PostgreSQL does CAST implicitely between int and a domain derived from int

2009-08-29 Thread Jean-Michel Pouré
Le samedi 29 août 2009 à 13:44 -0400, Tom Lane a écrit : That domain doesn't have any operators of its own. To compare to another value, or use an index, you have to cast it to integer which does have operators. It's a no-op cast, but logically necessary. Dear Tom, Thanks for answering. On

Re: [PERFORM] PostgreSQL does CAST implicitely between int and a domain derived from int

2009-08-29 Thread Tom Lane
Jean-Michel =?ISO-8859-1?Q?Pour=E9?= j...@poure.com writes: What do you recommend: using normal types and moving constraints in the Drupal database? Is PostgreSQL domain broken as it forces casting or is this a no-op for performance? In principle it should be an unnoticeable slowdown. In the

[PERFORM] Re: PostgreSQL does CAST implicitely between int and a domain derived from int

2009-08-29 Thread Greg Stark
On Sat, Aug 29, 2009 at 10:45 PM, Tom Lanet...@sss.pgh.pa.us wrote: Jean-Michel =?ISO-8859-1?Q?Pour=E9?= j...@poure.com writes: What do you recommend: using normal types and moving constraints in the Drupal database? Is PostgreSQL domain broken as it forces casting or is this a no-op for

Re: [PERFORM] What exactly is postgres doing during INSERT/UPDATE ?

2009-08-29 Thread Jeff Janes
On Sat, Aug 29, 2009 at 6:26 AM, Merlin Moncure mmonc...@gmail.com wrote: On Fri, Aug 28, 2009 at 8:19 PM, Jeff Janesjeff.ja...@gmail.com wrote: -- Forwarded message -- From: Joseph S j...@selectacast.net To: Greg Smith gsm...@gregsmith.com, pgsql-performance@postgresql.org