Re: [GENERAL] performance very slow

2004-05-26 Thread Frank Finner
Hi, shared_buffers seems quite low for a server to me. For best performance, you should read and follow the optimisation articles on http://techdocs.postgresql.org/. Regards, Frank On Wed, 26 May 2004 11:26:30 -0400 (VET) "Mario Soto" <[EMAIL PROTECTED]> sat down, thought long and then wrote:

Re: [GENERAL] About table schema

2004-05-26 Thread Peter Eisentraut
Wei Shi wrote: > Hi, does anyone know how to get the schema information > of a table. More specifically, I would like to know > > 1. which field(s) are primary keys? > 2. the data type of each field of a table? > 3. If a field is a foreign key, what field/table it > is referring to. Use the infor

Re: [GENERAL] [HACKERS] COPY formatting

2004-05-26 Thread Bruce Momjian
Matt Van Mater wrote: > I have a comment about the following thread from about 2 months ago that > dealt with delimiters in the copy command: > http://marc.theaimsgroup.com/?l=postgresql-general&m=107960271207890&w=2 > > I wanted to chime in and say that I think having more complex delimiters >

Re: [GENERAL] [HACKERS] COPY formatting

2004-05-26 Thread Matt Van Mater
I have a comment about the following thread from about 2 months ago that dealt with delimiters in the copy command: http://marc.theaimsgroup.com/?l=postgresql-general&m=107960271207890&w=2 I wanted to chime in and say that I think having more complex delimiters would be very useful. I was curio

Re: [GENERAL] planer don't use index. bad plan for where id = x or id in (select ...)

2004-05-26 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > ... And you can use UNION ALL instead of UNION > since the IN will eliminate duplicates anyways. This avoids an extra > sort/uniquify step. FWIW, CVS tip realizes that it doesn't need two unique-ification steps in this scenario. But I agree that UNION ALL

[GENERAL] performance very slow

2004-05-26 Thread Mario Soto
Hi. i hava a postresql 7.4.2 in a production server. tha machine is a Pentium IV 2,6 GHZ AND 1 GB IN RAM with lINUX RH 9.0. The postresql.conf say: #--- # RESOURCE USAGE (except WAL) #

Re: [GENERAL] shadowing (like IB/Firebird)

2004-05-26 Thread David Garamond
Kragen Sitaker wrote: On Tue, Apr 27, 2004 at 10:36:24AM +0700, David Garamond wrote: Glen Parker wrote: Sounds an aweful lot like RAID level one :-) Why would a DB system need to do what RAID already does quite well? I think IB/FB's shadowing was implemented before RAID was invented Heh, not lik

Re: [GENERAL] insert/update

2004-05-26 Thread Greg Stark
Richard Huxton <[EMAIL PROTECTED]> writes: > Tom - you don't say precisely what you're trying to do, but I like to keep my > code simple by making sure there is always a row available. Or alternatively you could always try to insert the record with a count of 0 then increment. If the insert fail

Re: [GENERAL] planer don't use index. bad plan for where id = x or id in (select ...)

2004-05-26 Thread Greg Stark
Pavel Stehule <[EMAIL PROTECTED]> writes: > Hello, > > Pg make query 1. and 2. very fast (use index), but for query 3. dont use > index. I can solve its using select union, but I readed so pg 7.5 don't > problem with OR operator. I use cvs pg. I used vacuum analyze first. I don't think even i

[GENERAL] Error: server closed the connection unexpectedely

2004-05-26 Thread Janez Kostanjšek
Hello everyone,   this is my first post to postgres mailing list.   System that I use: I am using Postgres under last CygWin published on public mirrors at the moment. OS system runing is Windows 2000 professional, 1024 or 256 or 512 MB of RAM and 40Gb of disk. Postmaster shows version

Re: [GENERAL] insert/update

2004-05-26 Thread Jeff Eckermann
--- Tom Allison <[EMAIL PROTECTED]> wrote: > I seemed to remember being able to do this but I > can't find the docs. > > Can I run a sql query to insert new or update > existing rows in one query? > > Otherwise I have to run a select query to see if > it's there and then > another one to update/

Re: [GENERAL] [ADMIN] Clustering Postgres

2004-05-26 Thread Robert Treat
Some basics on how easy it is to install/configure and some before/after type benchmarks showing how it affected performance. Perferrably you could measure simple vs. complex queries as well as update vs. insert performance. If you're really ambitious you could try running one of the tpc style

Re: [GENERAL] insert/update

2004-05-26 Thread Richard Huxton
Paul Thomas wrote: On 26/05/2004 11:54 Tom Allison wrote: What I'm trying to do is create a counter for each key, insert a value of 1 or increment the value by 1 and then set another specific row (where key = $key) to always increment by 1. Use a sequence. Not sure it's going to help him here.

Re: [GENERAL] insert/update

2004-05-26 Thread Paul Thomas
On 26/05/2004 11:54 Tom Allison wrote: I seemed to remember being able to do this but I can't find the docs. Can I run a sql query to insert new or update existing rows in one query? Otherwise I have to run a select query to see if it's there and then another one to update/insert. What I'm trying

[GENERAL] insert/update

2004-05-26 Thread Tom Allison
I seemed to remember being able to do this but I can't find the docs. Can I run a sql query to insert new or update existing rows in one query? Otherwise I have to run a select query to see if it's there and then another one to update/insert. What I'm trying to do is create a counter for each key

Re: [GENERAL] About table schema

2004-05-26 Thread Richard Huxton
Wei Shi wrote: This is great. Thanks. There is also the information schema in 7.4, e.g. "SELECT * FROM information_schema.tables" There's not as much detail there, but it's supposed to be standard across different database systems. -- Richard Huxton Archonet Ltd ---