[GENERAL] insertion becoming slow

2005-09-27 Thread surabhi.ahuja
thanks for the help.. i removed a few indexes, but i cant remove the primary key and uniqye key constraints ..whoch means that indexes will be made on these 2 attributes. i have four tables, each having such 2 attributes, one which is the primary key and the other is the uniqu key. and the

Re: [GENERAL] regarding select into

2005-09-27 Thread Rolf �stvik
[EMAIL PROTECTED] (surabhi.ahuja) wrote in news:[EMAIL PROTECTED]: Hello, Is it not possible to write such an sql statement: select ser into val1, count(*) into val2 from tab1 where id = $1; do i need to perform the 2 selects separately ..wont that impact the performance? in

[GENERAL] Restore xxxxx.backup database

2005-09-27 Thread adccs
Help needed to restore a backup database! 1. Postgres service was started. When I run a restore command for the backup stored in /tmp (backed from another server working on this database and sent to meby email by another user). I created a database by the same name royapuram by using createdb

[GENERAL] change db encoding?

2005-09-27 Thread Gábor Farkas
hi, for historical reasons ;) (are there any other reasons), we have a postgres db, where the data are in iso-8859-15 encoding, but the database encoding is iso-8859-1. question(s): 1. is it possible to change the db-encoding? 2. if it remains like it is currently, when can there be problems?

Re: [GENERAL] insertion becoming slow

2005-09-27 Thread Csaba Nagy
Hi all, I've recently asked a similar question, which received no useful answer yet, so I'll drop in too. In my case, the table I was inserting to was a quite big one already to start with (and analyzed so), so I was expecting that it will not slow down due to indexes, as they were quite big to

[GENERAL] insertion becoming slow

2005-09-27 Thread surabhi.ahuja
it is the commit call to postgres that suddently takes more time than normal(as observed for other inserts) it seems as if postgres does some activity (on its own) after some installs. thats why i have observed this pattern i.e. commit taking less time for some installs (eg 1000) ..then

Re: [GENERAL] Can't change language through LC_MESSAGES

2005-09-27 Thread Peter Eisentraut
Am Dienstag, 27. September 2005 00:44 schrieb Thomas Kellerer: I'm trying to change the server messages back to english (initdb created 'German_Germany.1251' because I'm running a German Windows) by setting the lc_messages property to 'C'. But the messages from e.g. pgsql or pg_ctl still show

Re: [GENERAL] change db encoding?

2005-09-27 Thread Peter Eisentraut
Am Dienstag, 27. September 2005 10:15 schrieb Gábor Farkas: for historical reasons ;) (are there any other reasons), we have a postgres db, where the data are in iso-8859-15 encoding, but the database encoding is iso-8859-1. question(s): 1. is it possible to change the db-encoding? You

[GENERAL] insertion becoming slow

2005-09-27 Thread surabhi.ahuja
is it some logging information that is being written into some file at the end ofsome transactions (each intsall is one transaction for me) the data directory is containing these folders.. base/ pg_clog/ pg_ident.conf pg_subtrans/ PG_VERSION postgresql.conf postmaster.pidglobal/ pg_hba.conf

Re: [GENERAL] change db encoding?

2005-09-27 Thread Gábor Farkas
Peter Eisentraut wrote: Am Dienstag, 27. September 2005 10:15 schrieb Gábor Farkas: for historical reasons ;) (are there any other reasons), we have a postgres db, where the data are in iso-8859-15 encoding, but the database encoding is iso-8859-1. 2. if it remains like it is currently, when

[GENERAL] Query Question

2005-09-27 Thread Frodo Larik
Hi All, I have the following simplified setup. A client has 2 products: 'vbp' and 'year_balance', but a client has also workers who have a product, named 'ib'. A client can have multiple workers. -- clients CREATE TABLE clients ( id serial NOT NULL PRIMARY KEY, name text NOT NULL,

[GENERAL] Performance woes relating to DISTINCT (I think)

2005-09-27 Thread boinger
Hello. I'm not sure if this is a question suited for here, the -sql list, or the -performance list, so if I'm mis-posting, please direct me to the right list. I was unable to come up with anything relevant from the archives (though...I am not too sure where to start so I may just have been

Re: [GENERAL] How many insert + update should one transaction handle?

2005-09-27 Thread Yonatan Ben-Nes
Jim C. Nasby wrote: On Mon, Sep 26, 2005 at 08:41:03PM +0200, Yonatan Ben-Nes wrote: Anyway I saw the idea: BEGIN; CREATE new_table; SELECT INTO new_table * FROM temp_table; DROP TABLE table; ALTER TABLE new_table RENAME TO table; COMMIT; Where if I understood correctly table is the final

Re: [GENERAL] Index use in BETWEEN statement...

2005-09-27 Thread Yonatan Ben-Nes
Tom Lane wrote: Cristian Prieto [EMAIL PROTECTED] writes: mydb=# explain analyze select locid from geoip_block where '216.230.158.50'::inet between start_block and end_block; As you see it still using a sequential scan in the table and ignores the index, any other suggestion? That

Re: [GENERAL] Restore xxxxx.backup database

2005-09-27 Thread Richard Huxton
adccs wrote: Help needed to restore a backup database! 1. Postgres service was started. When I run a restore command for the backup stored in /tmp (backed from another server working on this database and sent to meby email by another user). I created a database by the same name royapuram by

Re: [GENERAL] Index use in BETWEEN statement...

2005-09-27 Thread Sean Davis
On 9/27/05 7:45 AM, Yonatan Ben-Nes [EMAIL PROTECTED] wrote: Tom Lane wrote: Cristian Prieto [EMAIL PROTECTED] writes: mydb=# explain analyze select locid from geoip_block where '216.230.158.50'::inet between start_block and end_block; As you see it still using a sequential scan in the

Re: [GENERAL] Performance woes relating to DISTINCT (I think)

2005-09-27 Thread Dawid Kuroczko
On 9/26/05, boinger [EMAIL PROTECTED] wrote: Hello.I'm not sure if this is a question suited for here, the -sql list, orthe -performance list, so if I'm mis-posting, please direct me to theright list.I was unable to come up with anything relevant from the archives (though...I am not too sure where

[GENERAL] Mysterious query plan

2005-09-27 Thread John D. Burger
Hi - I mistyped a table name in the following query: select * from gazContainers where gazPlaceID in (select gazPlaceID from tipsterAuxiliary); Turns out there's no gazPlaceID column in tipsterAuxiliary, so the inner gazPlaceID was referring to the outer gazContainers table. This

[GENERAL] Slow query using LIMIT

2005-09-27 Thread Poul Møller Hansen
Doing the following query: explain analyze SELECT * FROM my.tablename WHERE node = '1234567890' AND date BETWEEN '2005-03-27' AND NOW() ORDER BY id DESC takes 1,3 sec. with this result: Sort (cost=52971.52..53033.26 rows=24693 width=93) (actual time=1141.002..1252.995 rows=25109 loops=1)

Re: [GENERAL] Slow query using LIMIT

2005-09-27 Thread Yonatan Ben-Nes
Poul Møller Hansen wrote: Doing the following query: explain analyze SELECT * FROM my.tablename WHERE node = '1234567890' AND date BETWEEN '2005-03-27' AND NOW() ORDER BY id DESC takes 1,3 sec. with this result: Sort (cost=52971.52..53033.26 rows=24693 width=93) (actual

Re: [GENERAL] Extraordinarily slow!!

2005-09-27 Thread Tom Lane
Justin R. Smith [EMAIL PROTECTED] writes: I've solved the problem. I was accessing Postgres over an ssh connection and had enabled X forwarding in the sshd server (not the default configuration). For reasons that pass understanding, psql attempts to establish an X connection with EACH

Re: [GENERAL] Restore xxxxx.backup database

2005-09-27 Thread Tom Lane
Richard Huxton dev@archonet.com writes: adccs wrote: [EMAIL PROTECTED] ~]# /usr/bin/pg_restore -a /tmp/royapuram.backup ERROR: pg_restore: [archiver] unsupported version (1.10) in file header Your user probably has a more recent version of PostgreSQL than you do, so pg_restore can't

Re: [GENERAL] Performance woes relating to DISTINCT (I think)

2005-09-27 Thread boinger
On 9/27/05, Dawid Kuroczko [EMAIL PROTECTED] wrote: QUERY PLAN - GroupAggregate (cost=0.00..85168.65 rows=11 width=22) (actual time=3149.916..45578.292 rows=515 loops=1) Hmm, planner expected 11 rows, got 515 (cost=0.00..85167.23 rows=107 width=22) (actual

Re: [GENERAL] Mysterious query plan

2005-09-27 Thread Tom Lane
John D. Burger [EMAIL PROTECTED] writes: I mistyped a table name in the following query: select * from gazContainers where gazPlaceID in (select gazPlaceID from tipsterAuxiliary); Turns out there's no gazPlaceID column in tipsterAuxiliary, so the inner gazPlaceID was referring to

Re: [GENERAL] Slow query using LIMIT [SOLVED]

2005-09-27 Thread Poul Møller Hansen
Doing the following query: explain analyze SELECT * FROM my.tablename WHERE node = '1234567890' AND date BETWEEN '2005-03-27' AND NOW() ORDER BY id DESC ORDER BY node,id is forcing the planner to use the right index. Thanks, Poul ---(end of

Re: [GENERAL] Extraordinarily slow!!

2005-09-27 Thread Martijn van Oosterhout
On Tue, Sep 27, 2005 at 09:38:46AM -0400, Tom Lane wrote: Justin R. Smith [EMAIL PROTECTED] writes: Interestingly, it does NOT help to have X forwarding turned off only in the client: sshd itself must not do any forwarding. [ scratches head... ] That makes no sense at all. psql doesn't

Re: [GENERAL] Need for java based web admin tool

2005-09-27 Thread Andrus
If it just needs to work over HTTP, there are frontends that can tunnel over a HTTP connection. EMS Postgres Manager is one of them and the lite versions are free. http://www.sqlmanager.net Hannes, How to edit the table data with free version ( addd, delete, filter rows)? pgAdmin allows

[GENERAL] restore

2005-09-27 Thread Uroš Gruber
Hi! I have an old pgsql dir backuped and I want to know if there's any way to restore some data from this files. Any tool I can use. regards Uros ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate

Re: [GENERAL] restore

2005-09-27 Thread Douglas McNaught
Uroš Gruber [EMAIL PROTECTED] writes: Hi! I have an old pgsql dir backuped and I want to know if there's any way to restore some data from this files. Any tool I can use. Re-install the version that created the files and use pg_dump to dump it out to SQL. That's by far the easiest way.

[GENERAL] Problem with Cursor in Oracle from Postgresql via ODBC

2005-09-27 Thread Thomas Radnetter
Hi everybody, if someone get's confused by the subject, let me explain: Oracle 10g on Linux with ODBC installation for DB-Link to Postgresql. That works very fine! But, now the problem: In PL/SQL procedure I open a view on the PGSQL (8.0.3) DB into a cursor which i want to loop through until

Re: [GENERAL] ERROR: type temp_gc already exists

2005-09-27 Thread Damon Hart
Hi all - I came across this thread after intermittently observing very similar error messages last week from a PostgreSQL (8.0.2) server, e.g.: SQL error: = 'type local_roll already exists' in line 1984 (only the portion in quotes is generated by the server, the context is from the client

Re: [GENERAL] ERROR: type temp_gc already exists

2005-09-27 Thread Tom Lane
Damon Hart [EMAIL PROTECTED] writes: I came across this thread after intermittently observing very similar error messages last week from a PostgreSQL (8.0.2) server, e.g.: SQL error: = 'type local_roll already exists' in line 1984 ... Sorry I haven't been able to diagnose this any more

Re: [GENERAL] Can't change language through LC_MESSAGES

2005-09-27 Thread Thomas Kellerer
Tom Lane wrote on 27.09.2005 03:19: Thomas Kellerer [EMAIL PROTECTED] writes: I'm trying to change the server messages back to english (initdb created 'German_Germany.1251' because I'm running a German Windows) by setting the lc_messages property to 'C'. But the messages from e.g. pgsql or

Re: [GENERAL] RI_ConstraintTrigger question

2005-09-27 Thread Jan Wieck
On 9/27/2005 12:20 AM, George Essig wrote: On 9/26/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wro We have a database with about 30 tables and some RI. The RI constraints, however, were not named upon creation of the database 2-3 years ago and now when we get an error it contains unnamed for the

Re: [GENERAL] RI_ConstraintTrigger question

2005-09-27 Thread Tom Lane
Jan Wieck [EMAIL PROTECTED] writes: On 9/27/2005 12:20 AM, George Essig wrote: We have a database with about 30 tables and some RI. The RI constraints, however, were not named upon creation of the database 2-3 years ago and now when we get an error it contains unnamed for the constraint.

Re: [GENERAL] RI_ConstraintTrigger question

2005-09-27 Thread Jan Wieck
On 9/27/2005 3:27 PM, Tom Lane wrote: Jan Wieck [EMAIL PROTECTED] writes: On 9/27/2005 12:20 AM, George Essig wrote: We have a database with about 30 tables and some RI. The RI constraints, however, were not named upon creation of the database 2-3 years ago and now when we get an error it

Re: [GENERAL] RI_ConstraintTrigger question

2005-09-27 Thread [EMAIL PROTECTED]
Tom Lane wrote: Jan Wieck [EMAIL PROTECTED] writes: On 9/27/2005 12:20 AM, George Essig wrote: We have a database with about 30 tables and some RI. The RI constraints, however, were not named upon creation of the database 2-3 years ago and now when we get an error it contains unnamed for the