Re: [GENERAL] SQL spec/implementation question: UPDATE

2007-10-21 Thread Tom Lane
Kevin Hunter <[EMAIL PROTECTED]> writes: > I don't have handy a spec guide. Does this mean that MySQL is indeed > showing incorrect behavior? I think this is really outside the spec. The relevant sections of SQL92 seem to be in 13.10 : ::= UPDATE SET

Re: [GENERAL] SQL spec/implementation question: UPDATE

2007-10-21 Thread Kevin Hunter
At 11:33p -0400 on 21 Oct 2007, Ron Johnson wrote: > Not to bash MySQL (much...) but ISTM that this is another example of > MySQL playing fast and loose with SQL. I don't have handy a spec guide. Does this mean that MySQL is indeed showing incorrect behavior? I like what's been said upthread: T

Re: [GENERAL] SQL spec/implementation question: UPDATE

2007-10-21 Thread Kevin Hunter
At 6:52p -0400 on 21 Oct 2007, Tom Lane wrote: > andy <[EMAIL PROTECTED]> writes: >> I think your comparing apples and oranges. I'll bet that mysql is >> taking a shortcut and testing the value before updating it. > >> The update is probably more close to: >> update test set name = 'kevin' where

Re: [GENERAL] SQL spec/implementation question: UPDATE

2007-10-21 Thread Kevin Hunter
At 6:00p -0400 on 21 Oct 2007, andy wrote: > I think your comparing apples and oranges. That's why I ask the list! To learn when I'm doing that. ;-) > I'll bet that mysql is > taking a shortcut and testing the value before updating it. Heh. And as Tom points out downthread, that "shortcut" p

Re: [GENERAL] looking for some real world performance numbers

2007-10-21 Thread Ow Mun Heng
On Mon, 2007-10-22 at 01:23 -0400, Guy Rouillier wrote: > Ow Mun Heng wrote: > > On Sun, 2007-10-21 at 22:54 -0400, Guy Rouillier wrote: > >> The current app uses stored procedures > >> for all inserts, and PG didn't do well with that approach; substituting > >> embedded inserts fixed that prob

Re: [GENERAL] looking for some real world performance numbers

2007-10-21 Thread Guy Rouillier
Ow Mun Heng wrote: On Sun, 2007-10-21 at 22:54 -0400, Guy Rouillier wrote: The current app uses stored procedures for all inserts, and PG didn't do well with that approach; substituting embedded inserts fixed that problem. So PG can definitely "handle" very Can you explain what is embedde

Re: [GENERAL] looking for some real world performance numbers

2007-10-21 Thread Harvey, Allan AC
> As far as real world numbers, we have a data-intensive app > (network data > collection for a telecom company) that is currently inserting > about 16 > million rows a day. I benchmarked PG for that app and with some > tweaking, PG could handle it. Me too, not telco though. 5.5 million per d

Re: [GENERAL] looking for some real world performance numbers

2007-10-21 Thread Joshua D. Drake
Dave Cramer wrote: snacktime wrote: I'm working through the architecture design for a new product. We have a small group working on this. It's a web app that will be using ruby on rails. The challenge I'm running into is that the latest conventional wisdom seems to be that since obviously dat

Re: [GENERAL] Indexes & Primary Keys (based on the same columns)

2007-10-21 Thread Tom Lane
Ow Mun Heng <[EMAIL PROTECTED]> writes: > I'm wondering if what I'm doing is redundant. > I have a primary key on columns (A,B,C,D) > and I've also defined an index based on the same columns (A,B,C,D) Yup, 100% redundant. regards, tom lane ---(end

Re: [GENERAL] Indexes & Primary Keys (based on the same columns)

2007-10-21 Thread Ow Mun Heng
On Sun, 2007-10-21 at 20:49 -0700, Joshua D. Drake wrote: > Ow Mun Heng wrote: > > I'm wondering if what I'm doing is redundant. > > > > I have a primary key on columns (A,B,C,D) > > and I've also defined an index based on the same columns (A,B,C,D) > > > > and sometimes in the query explain, I

Re: [GENERAL] Indexes & Primary Keys (based on the same columns)

2007-10-21 Thread Joshua D. Drake
Ow Mun Heng wrote: I'm wondering if what I'm doing is redundant. I have a primary key on columns (A,B,C,D) and I've also defined an index based on the same columns (A,B,C,D) and sometimes in the query explain, I see the pkey being used for the scan instead of the index. So.. That made me think

[GENERAL] Indexes & Primary Keys (based on the same columns)

2007-10-21 Thread Ow Mun Heng
I'm wondering if what I'm doing is redundant. I have a primary key on columns (A,B,C,D) and I've also defined an index based on the same columns (A,B,C,D) and sometimes in the query explain, I see the pkey being used for the scan instead of the index. So.. That made me think perhaps the addition

Re: [GENERAL] command to view the tables

2007-10-21 Thread Ow Mun Heng
On Sun, 2007-10-21 at 20:35 -0700, Shwe Yee Than wrote: > I'm new to postgresql. I'm running postgresql database on Linux > platform. I just wanna know the command to view all the tables inside > a specific database. Can anyone tell me? \d would be what you use in psql or just do a \? for he

[GENERAL] command to view the tables

2007-10-21 Thread Shwe Yee Than
Hi all, I'm new to postgresql. I'm running postgresql database on Linux platform. I just wanna know the command to view all the tables inside a specific database. Can anyone tell me? Thanks! ~Shwe~ __ Do You Yahoo!? Tired of spam? Ya

Re: [GENERAL] SQL spec/implementation question: UPDATE

2007-10-21 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/21/07 17:52, Tom Lane wrote: > andy <[EMAIL PROTECTED]> writes: >> I think your comparing apples and oranges. I'll bet that mysql is >> taking a shortcut and testing the value before updating it. > >> The update is probably more close to: >> u

Re: [GENERAL] looking for some real world performance numbers

2007-10-21 Thread Ow Mun Heng
On Sun, 2007-10-21 at 22:54 -0400, Guy Rouillier wrote: > The current app uses stored procedures > for all inserts, and PG didn't do well with that approach; substituting > embedded inserts fixed that problem. So PG can definitely "handle" very Can you explain what is embedded inserts? --

Re: [GENERAL] looking for some real world performance numbers

2007-10-21 Thread Guy Rouillier
Dave Cramer wrote: snacktime wrote: I'm working through the architecture design for a new product. We have a small group working on this. It's a web app that will be using ruby on rails. The challenge I'm running into is that the latest conventional wisdom seems to be that since obviously dat

Re: [GENERAL] SQL spec/implementation question: UPDATE

2007-10-21 Thread Tom Lane
andy <[EMAIL PROTECTED]> writes: > I think your comparing apples and oranges. I'll bet that mysql is > taking a shortcut and testing the value before updating it. > The update is probably more close to: > update test set name = 'kevin' where passion = 'soccer' and name <> 'kevin'; Yeah, that se

Re: [GENERAL] Select Command

2007-10-21 Thread Adrian Klaver
On Sunday 21 October 2007 2:32 pm, Bob Pawley wrote: > I have a column with data structured as follows. > > 32TT - 0002 > 32LT- 0004 > 32PT-0005 > > Is there a way of selecting all of the rows containing LT in that column?? > > > I have attempted variations of ' *LT* ' with out success. > > Bob Paw

Re: [GENERAL] SQL spec/implementation question: UPDATE

2007-10-21 Thread andy
Kevin Hunter wrote: Hullo list, A perhaps esoteric question: Short version: What do the specs say (if anything) about returning information from UPDATE commands? Or about handling update request that don't effectively do anything? Longer version: CREATE TABLE test ( id SERIAL NOT NUL

Re: [GENERAL] Select Command

2007-10-21 Thread Alvaro Herrera
Bob Pawley wrote: > I have a column with data structured as follows. > > 32TT - 0002 > 32LT- 0004 > 32PT-0005 > > Is there a way of selecting all of the rows containing LT in that column?? > > > I have attempted variations of ' *LT* ' with out success. LIKE '%LT%' perhaps? Or ~ 'LT' (unanchor

[GENERAL] Select Command

2007-10-21 Thread Bob Pawley
I have a column with data structured as follows. 32TT - 0002 32LT- 0004 32PT-0005 Is there a way of selecting all of the rows containing LT in that column?? I have attempted variations of ' *LT* ' with out success. Bob Pawley

[GENERAL] SQL spec/implementation question: UPDATE

2007-10-21 Thread Kevin Hunter
Hullo list, A perhaps esoteric question: Short version: What do the specs say (if anything) about returning information from UPDATE commands? Or about handling update request that don't effectively do anything? Longer version: CREATE TABLE test ( id SERIAL NOT NULL, nameTEXT NO

Re: [GENERAL] looking for some real world performance numbers

2007-10-21 Thread Tom Lane
Thomas Kellerer <[EMAIL PROTECTED]> writes: > Where else do they want to store relational data than in a RDBMS? Indeed. It seems like we can hardly answer the OP's question without asking "compared to what?" If they're afraid an RDBMS won't scale, what have they got in mind that they are so cert

Re: [GENERAL] looking for some real world performance numbers

2007-10-21 Thread Thomas Kellerer
snacktime wrote on 21.10.2007 08:11: I have a group of otherwise very bright people trying to convince me that a rdbms is not a good place to store relational data Hmm. Those bright people say that a /relational/ database management system is not a good place to store /relational/ data? I

Re: [GENERAL] looking for some real world performance numbers

2007-10-21 Thread paul rivers
snacktime wrote: I'm working through the architecture design for a new product. We have a small group working on this. It's a web app that will be using ruby on rails. The challenge I'm running into is that the latest conventional wisdom seems to be that since obviously databases don't scale o

Re: [GENERAL] Explicit Named Indexes for Constraints

2007-10-21 Thread Tom Lane
"Jeff Larsen" <[EMAIL PROTECTED]> writes: > In Informix, it is recommended to create explicit named indexes on > columns for primary and foreign keys prior to creating the > constraints. Otherwise, the server create the indexes for you with > meaningless names. This is not generally a problem, exce

Re: [GENERAL] 8.2.3: Server crashes on Windows using Eclipse/Junit

2007-10-21 Thread Rainer Bauer
Magnus Hagander wrote: >Trevor Talbot wrote: >> On 10/20/07, Rainer Bauer <[EMAIL PROTECTED]> wrote: >> >>> Anyway, the problem are the no. of semaphores created by Postgres: >>> Every backend creates at least 4* semaphores. Just >>> increase to an unusual high value (say 1) and >>> start cr

Re: [GENERAL] looking for some real world performance numbers

2007-10-21 Thread Dave Cramer
snacktime wrote: I'm working through the architecture design for a new product. We have a small group working on this. It's a web app that will be using ruby on rails. The challenge I'm running into is that the latest conventional wisdom seems to be that since obviously databases don't scale o

[GENERAL] Explicit Named Indexes for Constraints

2007-10-21 Thread Jeff Larsen
I'm new to PosgtreSQL, a veteran with Informix. We are considering a migration. In Informix, it is recommended to create explicit named indexes on columns for primary and foreign keys prior to creating the constraints. Otherwise, the server create the indexes for you with meaningless names. This i

Re: [GENERAL] keeping an index in memory

2007-10-21 Thread Scott Marlowe
On 10/21/07, Rajarshi Guha <[EMAIL PROTECTED]> wrote: > > > With 8G of RAM, you should start with shared_buffers around 2 - 3G, if > > you're using a modern version of PG. > > I can do that but I'm a little confused. Earlier postings on the list > indicate that shared_buffers should be about 10% of

Re: [GENERAL] keeping an index in memory

2007-10-21 Thread Gregory Stark
"Rajarshi Guha" <[EMAIL PROTECTED]> writes: > The table itself is about 10M rows corresponding to 14GB. Each row is on average 1.4kB ? Perhaps you should send more details of the table definition and the typical size of each column. It's possible you have the columns you're selecting on being st

[GENERAL] Photos from the PostgreSQL Conference Fall 2007

2007-10-21 Thread Daniel Browning
The PostgreSQL Conference Fall 2007 was informative, fun, and well-executed. Thanks to Selena Deckelmann, Joshua Drake, and everyone else who made it happen. Here are my photos of the event: http://db.endpoint.com/pgcon07/ -- Daniel Browning End Point Corporation http://www.endpoint.com/ --

Re: [GENERAL] keeping an index in memory

2007-10-21 Thread Tom Lane
Rajarshi Guha <[EMAIL PROTECTED]> writes: > Now, it might just be the case that given the size of the index, I > cannot make bounding box queries (which will use the CUBE index) go > any faster. But I am surprised that that the other type of query > (using cube_distance which by definition mu

Re: [GENERAL] keeping an index in memory

2007-10-21 Thread Rajarshi Guha
On Oct 21, 2007, at 10:40 AM, Martijn van Oosterhout wrote: On Sun, Oct 21, 2007 at 07:36:00AM -0400, Bill Moran wrote: What version of PG are you using and what is your shared_buffers setting? With 8G of RAM, you should start with shared_buffers around 2 - 3G, if you're using a modern v

Re: [GENERAL] keeping an index in memory

2007-10-21 Thread Rajarshi Guha
On Oct 21, 2007, at 7:36 AM, Bill Moran wrote: Rajarshi Guha <[EMAIL PROTECTED]> wrote: Hi, relating to my previous queries on doing spatial searches on 10M rows, it seems that most of my queries return within 2 minutes. Generally this is not too bad, though faster is always better. Interest

Re: [GENERAL] keeping an index in memory

2007-10-21 Thread Martijn van Oosterhout
On Sun, Oct 21, 2007 at 07:36:00AM -0400, Bill Moran wrote: > What version of PG are you using and what is your shared_buffers setting? > > With 8G of RAM, you should start with shared_buffers around 2 - 3G, if > you're using a modern version of PG. With that much shared memory, a > large portion

Re: [GENERAL] Inheritance foreign key unexpected behaviour

2007-10-21 Thread Scott Marlowe
On 10/20/07, M. van Egmond <[EMAIL PROTECTED]> wrote: > Hi all, > > Im trying to use table inheritance in my database. I need it because i want > to be able to link any object in the database to another. So i created a > table my_object which has a serial, nothing more. All the other tables in > th

Re: [GENERAL] looking for some real world performance numbers

2007-10-21 Thread andy
I'll agree with Bill's response... If they dont want a rdbms what do they want? If they know of something that scales better and is faster, I'll bet they can make a lot of money. Lot of high traffic sites would love to hear what they think. > conventional wisdom seems to be that since obvi

Re: [GENERAL] looking for some real world performance numbers

2007-10-21 Thread Bill Moran
snacktime <[EMAIL PROTECTED]> wrote: > > I'm working through the architecture design for a new product. We > have a small group working on this. It's a web app that will be using > ruby on rails. The challenge I'm running into is that the latest > conventional wisdom seems to be that since obvio

Re: [GENERAL] keeping an index in memory

2007-10-21 Thread Bill Moran
Rajarshi Guha <[EMAIL PROTECTED]> wrote: > > Hi, relating to my previous queries on doing spatial searches on 10M > rows, it seems that most of my queries return within 2 minutes. > Generally this is not too bad, though faster is always better. > > Interestingly, it appears that the CUBE index

Re: [GENERAL] 8.2.3: Server crashes on Windows using Eclipse/Junit

2007-10-21 Thread Magnus Hagander
Trevor Talbot wrote: > On 10/17/07, Magnus Hagander <[EMAIL PROTECTED]> wrote: >> On Wed, Oct 17, 2007 at 02:40:14AM -0400, Tom Lane wrote: > >>> Maybe we should put an #ifdef WIN32 into guc.c to limit max_connections >>> to something we know the platform can stand? It'd be more comfortable >>> i

Re: [GENERAL] 8.2.3: Server crashes on Windows using Eclipse/Junit

2007-10-21 Thread Magnus Hagander
Trevor Talbot wrote: > On 10/20/07, Rainer Bauer <[EMAIL PROTECTED]> wrote: > >> Anyway, the problem are the no. of semaphores created by Postgres: >> Every backend creates at least 4* semaphores. Just >> increase to an unusual high value (say 1) and >> start creating new connections while mo