Re: [GENERAL] Insert ImageFile in PostgreSQL

2005-08-02 Thread Oluwatope Akinniyi
Johan, Try the link below for a sample project clip which you should customise for PostgreSQL. If you need further assistance feel free to contact me. http://www.shepherdhill.biz/downloads/image.zip Cheers. Tope Akinniyi CEO ShepherdHill Software Lagos, Nigeria ---(end

Re: [GENERAL] Need some help creating a database sandbox...

2005-08-02 Thread Eric D. Nielsen
On Aug 2, 2005, at 11:33 PM, Tom Lane wrote: "Eric D. Nielsen" <[EMAIL PROTECTED]> writes: ... simplest way I thought would be to have the testing tools drop/ create the testing database on every test case, and then populate the database from a specified file. However I don't want to give th

Re: [GENERAL] Need some help creating a database sandbox...

2005-08-02 Thread Tom Lane
"Eric D. Nielsen" <[EMAIL PROTECTED]> writes: > ... simplest way I thought would be to have the testing tools drop/create > the testing database on every test case, and then populate the > database from a specified file. However I don't want to give the > test user superuser privileges. Thu

[GENERAL] Need some help creating a database sandbox...

2005-08-02 Thread Eric D. Nielsen
I'm trying to setup a "safe" testing database environment for some unit testing of a web application. I would like to have the unit tests restore the database to a known state before every test. The simplest way I thought would be to have the testing tools drop/create the testing database

[GENERAL] Windows file path for copy

2005-08-02 Thread Richard Sydney-Smith
Windows XP SP2 with Postgresql 8.0.3 Two commands on fails the other succeeds: Fails : select import_sharedata('C:\\Documents and Settings\\Richard\\Desktop\\EzyChart-20050721'); Succeeds: select import_sharedata('C:\\EzyChart-20050721'); is it the spaces in the path that postgres does not

Re: [GENERAL] feeding big script to psql

2005-08-02 Thread Tom Lane
=?iso-8859-2?Q?Havasv=F6lgyi_Ott=F3?= <[EMAIL PROTECTED]> writes: > Thanks for the suggestion. I have just applied both switch , -f (I have > applied this in the previous case too) and -n, but it becomes slow again. At > the beginning it reads about 300 KB a second, and when it has read 1.5 MB,

Re: [GENERAL] indexes are farked

2005-08-02 Thread Mohan, Ross
BINGO. Noticed that, too. Guess all the energy was used getting up on the high horse. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Scott Marlowe Sent: Tuesday, August 02, 2005 5:09 PM To: Joshua D. Drake Cc: Bob Pawley; Jaime Casanova; Dr NoName; Rag

Re: [GENERAL] Failure to use indexes (fwd)

2005-08-02 Thread Edmund Dengler
Greetings! I have already increased the stats from 10 to 100. In addition, if I specify individual tables, then the indexes are used. However, when I go through the , then indexes are not used. I will try and expand the statistics, but suspect it is not the root cause of the problem. Regards! Ed

Re: [GENERAL] feeding big script to psql

2005-08-02 Thread Tom Lane
Peter Wilson <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >>> Oh? Could you provide a test case for this? I can certainly believe >>> that the planner might choose a bad plan if it has no statistics, but >>> it shouldn't take a long time to do it. > On investigation the problems occurs on 'EXPL

Re: [GENERAL] Failure to use indexes (fwd)

2005-08-02 Thread Scott Marlowe
On Tue, 2005-08-02 at 16:06, Dr NoName wrote: > The solution to my problem was to increase statistics > value and do another analyze. You can also change > default_statistics_target parameter in > postgresql.conf. Don't know if that's related to the > problem you're seeing, but it's worth a try. C

Re: [GENERAL] Failure to use indexes (fwd)

2005-08-02 Thread Dr NoName
The solution to my problem was to increase statistics value and do another analyze. You can also change default_statistics_target parameter in postgresql.conf. Don't know if that's related to the problem you're seeing, but it's worth a try. Eugene --- Edmund Dengler <[EMAIL PROTECTED]> wrote: >

Re: [GENERAL] Slow Inserts on 1 table?

2005-08-02 Thread Scott Marlowe
On Tue, 2005-08-02 at 15:52, John D. Burger wrote: > > I hope you're at least on 7.2.8, else you are also vulnerable to a > > number of data-loss-grade bugs. > > Sadly, it seems to be exactly 7.2. > > > Try perusing the release notes at > > http://developer.postgresql.org/docs/postgres/release.ht

Re: [GENERAL] indexes are farked

2005-08-02 Thread Scott Marlowe
On Tue, 2005-08-02 at 15:52, Joshua D. Drake wrote: > Bob Pawley wrote: > > Language reflects the character of those who use it. > > > > In this case, the language used also reflects on the community to which > > it is directed. > > > > I don't wish to be associated with a "professional" communi

Re: [GENERAL] indexes are fucked

2005-08-02 Thread Joshua D. Drake
Bob Pawley wrote: Language reflects the character of those who use it. In this case, the language used also reflects on the community to which it is directed. I don't wish to be associated with a "professional" community, such as Postgre, that holds such shallow values. Well since there is

Re: [GENERAL] Slow Inserts on 1 table?

2005-08-02 Thread John D. Burger
I hope you're at least on 7.2.8, else you are also vulnerable to a number of data-loss-grade bugs. Sadly, it seems to be exactly 7.2. Try perusing the release notes at http://developer.postgresql.org/docs/postgres/release.html for ammunition. Excellent - the various security holes might get

Re: [GENERAL] Failure to use indexes (fwd)

2005-08-02 Thread Edmund Dengler
Greetings all! Given the quiet, I assume that there is no experience with index issues on inherited tables? Just seeing if anybody may have any ideas or suggested work arounds (I seem to have found one by constructing a query that does all the joins between inherited tables explicitely - this caus

Re: [GENERAL] indexes are fucked

2005-08-02 Thread Bob Pawley
Language reflects the character of those who use it. In this case, the language used also reflects on the community to which it is directed. I don't wish to be associated with a "professional" community, such as Postgre, that holds such shallow values. Bob Pawley - Original Message --

Re: [GENERAL] feeding big script to psql

2005-08-02 Thread Peter Wilson
Tom Lane wrote: Peter Wilson <[EMAIL PROTECTED]> writes: I found a while ago that after inserting a lot of rows into a clean Postgres table it would take several minutes just to analyse a command, not even starting the execution. Oh? Could you provide a test case for this? I can certainly b

Re: [GENERAL] feeding big script to psql

2005-08-02 Thread Peter Wilson
Tom Lane wrote: > Peter Wilson <[EMAIL PROTECTED]> writes: >> I found a while ago that after inserting a lot of rows into a clean >> Postgres table it would take several minutes just to analyse a command, >> not even starting the execution. > > Oh? Could you provide a test case for this? I can c

Re: [GENERAL] indexes are fucked

2005-08-02 Thread Jaime Casanova
On 8/2/05, Dr NoName <[EMAIL PROTECTED]> wrote: > Thanks Ragnar. That solved the problem. I still would > like some explanation about this voodoo. Most > importantly, how can I estimage a "good" statistics > number? > > thanks, > > Eugene http://www.postgresql.org/docs/8.0/static/planner-stats.h

Re: [GENERAL] indexes are fucked

2005-08-02 Thread Dr NoName
Thanks Ragnar. That solved the problem. I still would like some explanation about this voodoo. Most importantly, how can I estimage a "good" statistics number? thanks, Eugene --- Dr NoName <[EMAIL PROTECTED]> wrote: > > the seqscan is cheaper when a large enough > > proportion > > (maybe 5%) of

[GENERAL] user's groups

2005-08-02 Thread TJ O'Donnell
I know of the four user's group listed at http://pugs.postgresql.org/ I'm interested in starting one in the San Diego area. If there are others in San Diego who are interested, please get in touch with me. Thanks, TJ O'Donnell [EMAIL PROTECTED] ---(end of broadcast)-

Re: [GENERAL] Slow Inserts on 1 table?

2005-08-02 Thread Tom Lane
"John D. Burger" <[EMAIL PROTECTED]> writes: >> Your running 7.2? That is all kinds of level of... huh? Why? > I'm not running it, my organization is. Not sure how to interpret "all > kinds of level of..." Are there any huge suckages that I can use to > leverage an update? I'm familiar with s

Re: [GENERAL] indexes are farked

2005-08-02 Thread Michael Fuhr
On Tue, Aug 02, 2005 at 01:41:48PM -0500, Scott Marlowe wrote: > Also, you might want to look at tuning your database. I've found that > on machines that can cache most of their data sets, adjusting things > like effective_cache_size and random_page_cost makes a big difference. Also, as Ragnar Ha

Re: [GENERAL] Problem with dropping a tablespace

2005-08-02 Thread Tom Lane
Oliver Siegmar <[EMAIL PROTECTED]> writes: > On Tuesday 02 August 2005 19:49, Tom Lane wrote: >> Would you look at pg_class in particular (file 1259) and confirm that it >> contains only names of Postgres system catalogs and indexes, no tables >> of your own? > Everything in this file seems to be

Re: [GENERAL] indexes are farked

2005-08-02 Thread Scott Marlowe
On Tue, 2005-08-02 at 13:26, Dr NoName wrote: > > When's the last time you analyzed this table? And > > a few hours before I posted this. vacuumdb --analyze > also runs every night. Were there a lot of updates / deletes between when you ran analyze and when you ran this query? If so, you might

Re: [GENERAL] Problem with dropping a tablespace

2005-08-02 Thread Oliver Siegmar
On Tuesday 02 August 2005 19:49, Tom Lane wrote: > Oliver Siegmar <[EMAIL PROTECTED]> writes: > > I did a hexdump on the files within the tabelspace directory...no > > business data at all, only postgres internals (I saw a lot of function > > names and datatypes). > > Would you look at pg_class in

Re: [GENERAL] [BUGS] BUG #1552 followup

2005-08-02 Thread Jaime Casanova
On 8/2/05, Dan Armbrust <[EMAIL PROTECTED]> wrote: > Jaime Casanova wrote: > On 8/2/05, Dan Armbrust <[EMAIL PROTECTED]> > wrote: > I've been trying to track down some performance problems that I am having > doing large inserts on tables with foreign keys. I'm 99% sure that the > issue I am hav

Re: [GENERAL] indexes are fucked

2005-08-02 Thread Dr NoName
> the seqscan is cheaper when a large enough > proportion > (maybe 5%) of rows are retrieved, and indeed the > cost > is estimated at 39014 very good explanation. thank you. > try to increase statistics for this column: > > ALTER TABLE render ALTER COLUMN person_id > SET STATISTICS 1000; > AN

Re: [GENERAL] Slow Inserts on 1 table?

2005-08-02 Thread John D. Burger
Your running 7.2? That is all kinds of level of... huh? Why? I'm not running it, my organization is. Not sure how to interpret "all kinds of level of..." Are there any huge suckages that I can use to leverage an update? I'm familiar with some of the smaller ones. - John D. Burger G63

Re: [GENERAL] indexes are farked

2005-08-02 Thread Dr NoName
> When's the last time you analyzed this table? And a few hours before I posted this. vacuumdb --analyze also runs every night. > have you considered > running the pg_autovacuum daemon, which will vacuum > and analyze for you > in the back ground? We are using postgresql 7.3.2 which doesn't hav

Re: [GENERAL] indexes are farked

2005-08-02 Thread Scott Marlowe
On Tue, 2005-08-02 at 13:05, Dr NoName wrote: > siam_production=> explain analyze select * from render > where person_id = 432; > > QUERY PLAN >

Re: [GENERAL] Slow Inserts on 1 table?

2005-08-02 Thread Joshua D. Drake
John D. Burger wrote: The only annoyance is that the interface I use most often, Python's pgdb, runs everything in a transaction, and you can't analyze in a transaction. Hm? We've allowed ANALYZE inside a transaction for a long time. I'm stuck with using 7.2, for now, and I get this: ER

Re: [GENERAL] feeding big script to psql

2005-08-02 Thread Havasvölgyi Ottó
Scott, There were no foreign keys (even no indices) during data import, and none of the tables had more than 4000 records. And I have checked the log for durations, and all insert statements were 0.000 ms. So it seems that the problem is not at the server. During the process no other applicati

Re: [GENERAL] indexes are fucked

2005-08-02 Thread Ragnar Hafstað
On Tue, 2005-08-02 at 10:50 -0700, Dr NoName wrote: > > What is the output of these: > > > > set enable_seqscan = off; > > explain SELECT render.* FROM render WHERE person_id > > = 432; > > > QUERY PLAN >

Re: [GENERAL] indexes are farked

2005-08-02 Thread Dr NoName
siam_production=> explain analyze select * from render where person_id = 432; QUERY PLAN -- Seq Scan on render (cost=0.00..39014.72 rows=27

Re: [GENERAL] Slow Inserts on 1 table?

2005-08-02 Thread John D. Burger
The only annoyance is that the interface I use most often, Python's pgdb, runs everything in a transaction, and you can't analyze in a transaction. Hm? We've allowed ANALYZE inside a transaction for a long time. I'm stuck with using 7.2, for now, and I get this: ERROR: ANALYZE cannot run

[GENERAL] Questions about anonymous procedure/function.

2005-08-02 Thread Ying Lu
Greetings, I have a question about whether I am able to create an *anonymous* procedure/function under postgreSQL 8. Something like: Begin ... ... update ... IF ... THEN rollback END IF; ... ... END; I'd like to do a series of operations. If any one of the opers failed, all previ

Re: [GENERAL] indexes are fucked

2005-08-02 Thread Madison Kelly
This is really the only thing I can think to suggest; Have you tried 'SET enable_seqscan TO OFF;' and then tried the query again? This happens to me now and then where an index is a lot faster but the planner just doesn't want to use it. I've got an option in my code to turn off 'enable_seqsca

Re: [GENERAL] indexes are fucked

2005-08-02 Thread Dr NoName
> What is the output of these: > > set enable_seqscan = off; > explain SELECT render.* FROM render WHERE person_id > = 432; QUERY PLAN --

Re: [GENERAL] Problem with dropping a tablespace

2005-08-02 Thread Tom Lane
Oliver Siegmar <[EMAIL PROTECTED]> writes: > I did a hexdump on the files within the tabelspace directory...no business > data at all, only postgres internals (I saw a lot of function names and > datatypes). Would you look at pg_class in particular (file 1259) and confirm that it contains only n

Re: [GENERAL] feeding big script to psql

2005-08-02 Thread Peter Wilson
I was a little busy with deadlines at the time but I saved the database in it's slow configuration so I could investigate during a quieter period. I'll do a restore now and see whether I can remember back to April when I came across this issue. Pete Tom Lane wrote: Peter Wilson <[EMAIL PRO

Re: [GENERAL] [BUGS] BUG #1552 followup

2005-08-02 Thread Dan Armbrust
Jaime Casanova wrote: On 8/2/05, Dan Armbrust <[EMAIL PROTECTED]> wrote: I've been trying to track down some performance problems that I am having doing large inserts on tables with foreign keys. I'm 99% sure that the issue I am having is BUG 1552 - http://archives.postgresql.org/

Re: [GENERAL] Problem with dropping a tablespace

2005-08-02 Thread Oliver Siegmar
On Tuesday 02 August 2005 18:42, Tom Lane wrote: > > I dropped the database with 'DROP DATABASE xxx;' without any problems > > (after the tablespace run out of space). > > How exactly do you know that OID 595675173 is the database you dropped, > and not that of some other DB? I don't know that for

Re: [GENERAL] indexes are fucked

2005-08-02 Thread Ragnar Hafstað
On Tue, 2005-08-02 at 10:04 -0700, Dr NoName wrote: > I got another problem with postgres. This time it > refuses to use the indexes. Check this out: [snip] > siam_production=> explain SELECT render.* FROM render > WHERE person_id = 432; >QUERY PLAN >

Re: [GENERAL] indexes are farked

2005-08-02 Thread Scott Marlowe
On Tue, 2005-08-02 at 12:04, Dr NoName wrote: > Hi all, > > I got another problem with postgres. This time it > refuses to use the indexes. Check this out: > > > siam_production=> \d render > Table > "public.render" > Column|

Re: [GENERAL] Unable to Update a Record

2005-08-02 Thread Richard Huxton
Wang, Mary Y wrote: I tried to do (3) as well for reindex. But I got this error: reindex table users; ERROR: Cannot create unique index. Table contains non-unique values. Do you know what does this mean? Just what it says. Somehow your table has got corrupted, possibly with an old and a new

Re: [GENERAL] Slow Inserts on 1 table?

2005-08-02 Thread Martijn van Oosterhout
On Tue, Aug 02, 2005 at 10:41:01AM -0500, Dan Armbrust wrote: >But it is rather easy to get into rant mode when the prevailing >opinion is that not being able to insert rows into a table with a >foreign key without running Analyze after X rows is a misuse of the >DB, rather than a b

Re: [GENERAL] [BUGS] BUG #1552 followup

2005-08-02 Thread Jaime Casanova
On 8/2/05, Dan Armbrust <[EMAIL PROTECTED]> wrote: > I've been trying to track down some performance problems that I am > having doing large inserts on tables with foreign keys. > > I'm 99% sure that the issue I am having is BUG 1552 - > http://archives.postgresql.org/pgsql-bugs/2005-03/msg00183.p

Re: [GENERAL] Slow Inserts on 1 table?

2005-08-02 Thread Tom Lane
"John D. Burger" <[EMAIL PROTECTED]> writes: > The only annoyance is that the interface I use most often, Python's > pgdb, runs everything in a transaction, and you can't analyze in a > transaction. Hm? We've allowed ANALYZE inside a transaction for a long time. The real solution to Dan's prob

Re: [GENERAL] Problem with dropping a tablespace

2005-08-02 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > ... Is there any danger in Oliver removing the directory if > pg_database doesn't know about the database oid? No, but I'd counsel not doing so until we're certain we can't learn any more about what happened. > Should he shut down the postmaster before r

[GENERAL] indexes are fucked

2005-08-02 Thread Dr NoName
Hi all, I got another problem with postgres. This time it refuses to use the indexes. Check this out: siam_production=> \d render Table "public.render" Column|Type | Modifiers --

Re: [GENERAL] feeding big script to psql

2005-08-02 Thread Tom Lane
Peter Wilson <[EMAIL PROTECTED]> writes: > I found a while ago that after inserting a lot of rows into a clean > Postgres table it would take several minutes just to analyse a command, > not even starting the execution. Oh? Could you provide a test case for this? I can certainly believe that t

Re: [GENERAL] Problem with dropping a tablespace

2005-08-02 Thread Tom Lane
Oliver Siegmar <[EMAIL PROTECTED]> writes: > On Tuesday 02 August 2005 17:01, Michael Fuhr wrote: >> Hmmm...based on the file names, it looks like the directory contains >> only system tables. Do you know what database this was? > Yes, a business database - not a system one. The database were c

Re: [GENERAL] Unable to Update a Record

2005-08-02 Thread Wang, Mary Y
I tried to do (3) as well for reindex. But I got this error: reindex table users; ERROR: Cannot create unique index. Table contains non-unique values. Do you know what does this mean? Thanks in advance. Mary Wang -Original Message- From: Richard Huxton [mailto:[EMAIL PROTECTED] Sent

Force PostgreSQL to use indexes on foreign key lookups - Was: [GENERAL] Slow Inserts on 1 table?

2005-08-02 Thread Dan Armbrust
An aha moment: http://archives.postgresql.org/pgsql-bugs/2005-03/msg00183.php Some of the ensuing conversation seemed to indicate that a change was made in the 8.0 branch in March, that was intended to fix this issue. Any idea if that fix would have made it into the 8.0.3 release? Or maybe

Re: [GENERAL] CLUSTER equivalent

2005-08-02 Thread Tom Lane
Kevin Murphy <[EMAIL PROTECTED]> writes: > Are the two following options equivalent? > OPTION A (ordered insert): > CREATE TABLE table1 (cluster_col TEXT, col2 INTEGER); > CREATE INDEX idx1 ON table1(cluster_col); > INSERT INTO table1 (cluster_col, col2) SELECT cluster_col, col2 FROM > table1 ORD

Re: [GENERAL] feeding big script to psql

2005-08-02 Thread Scott Marlowe
On Tue, 2005-08-02 at 04:24, Havasvölgyi Ottó wrote: > Tom, > > Thanks for the suggestion. I have just applied both switch , -f (I have > applied this in the previous case too) and -n, but it becomes slow again. At > the beginning it reads about 300 KB a second, and when it has read 1.5 MB, > i

Re: [GENERAL] Slow Inserts on 1 table?

2005-08-02 Thread Dan Armbrust
Alvaro Herrera wrote: On Tue, Aug 02, 2005 at 10:01:50AM -0500, Dan Armbrust wrote: I shouldn't have to manually run Analyze to make the DB be capable of handling inserts involving tables with foreign keys correctly. My code that is doing the inserts is a java application that

Re: [GENERAL] Slow Inserts on 1 table?

2005-08-02 Thread Dan Armbrust
My loading is done programatically, from another format, so COPY is not an option. Why not? A lot of my bulk-loads are generated from other systems and I go through a temporary-file/pipe via COPY when I can. When I don't I block inserts into groups of e.g. 1000 and stick in an analyse/etc

Re: [GENERAL] Slow Inserts on 1 table?

2005-08-02 Thread Richard Huxton
Dan Armbrust wrote: What, ALWAYS faster, even for the first FK check when there's only one row in the target table and that's cached? If you're really in a hurry doing your bulk loads: 1. Use COPY. 2. Drop/restore the foreign-key constraints before/after. That will be hugely faster than I

Re: [GENERAL] Problem with dropping a tablespace

2005-08-02 Thread Oliver Siegmar
On Tuesday 02 August 2005 17:01, Michael Fuhr wrote: > Hmmm...based on the file names, it looks like the directory contains > only system tables. Do you know what database this was? Yes, a business database - not a system one. The database were created using template0. > Did you > explicitly

Re: [GENERAL] Slow Inserts on 1 table?

2005-08-02 Thread Alvaro Herrera
On Tue, Aug 02, 2005 at 10:01:50AM -0500, Dan Armbrust wrote: > I shouldn't have to manually run Analyze to make the DB be capable of > handling inserts involving tables with foreign keys correctly. My code > that is doing the inserts is a java application that works across > multiple DBS - My

Re: [GENERAL] Slow Inserts on 1 table?

2005-08-02 Thread Dan Armbrust
Joshua D. Drake wrote: Why can't postgres compile some rough statistics on tables without running analyze? Why can't you just run analyze? You don't have to empty the tables to do so and you can alter the statistics on the fly. Heck you can even run analyze while doing the inserts. I shou

Re: [GENERAL] Problem with dropping a tablespace

2005-08-02 Thread Michael Fuhr
On Tue, Aug 02, 2005 at 03:25:53PM +0200, Oliver Siegmar wrote: > On Tuesday 02 August 2005 15:16, Michael Fuhr wrote: > > > This directory indeed contains a subdirectory named 595675173 (the > > > ghost's database oid ;-)) > > > > Does that subdirectory contain anything? That's part of why I aske

Re: [GENERAL] Indexes

2005-08-02 Thread Tom Lane
Jake Stride <[EMAIL PROTECTED]> writes: > Does saying 'main' not mean where main=true as it is a boolean It means the same, but that doesn't make it an indexable condition. In Postgres, the index machinery is built around operators; if you don't have a WHERE clause like "indexvar operator somethin

Re: [GENERAL] Slow Inserts on 1 table?

2005-08-02 Thread Joshua D. Drake
Why can't postgres compile some rough statistics on tables without running analyze? Why can't you just run analyze? You don't have to empty the tables to do so and you can alter the statistics on the fly. Heck you can even run analyze while doing the inserts. Perhaps the fine manual would be

Re: [GENERAL] Slow Inserts on 1 table?

2005-08-02 Thread Dan Armbrust
What, ALWAYS faster, even for the first FK check when there's only one row in the target table and that's cached? If you're really in a hurry doing your bulk loads: 1. Use COPY. 2. Drop/restore the foreign-key constraints before/after. That will be hugely faster than INSERTs, although it's

Re: [GENERAL] Slow Inserts on 1 table?

2005-08-02 Thread Richard Huxton
Dan Armbrust wrote: Dan Armbrust wrote: I have one particular insert query that is running orders of magnitude slower than other insert queries, and I cannot understand why. For example, Inserts into "conceptProperty" (detailed below) are at least 5 times faster than inserts into "conceptPrope

Re: [GENERAL] Slow Inserts on 1 table?

2005-08-02 Thread John D. Burger
my guess is because analyze has not been run yet, so it thinks all of the tables are size 0. If I let it run for a while, then kill the load process, run Analyze, empty the tables, and then restart, things perform fine. But that is kind of a ridiculous sequence to have to use to load a databa

Re: [GENERAL] feeding big script to psql

2005-08-02 Thread Peter Wilson
Dan Sugalski wrote: At 1:57 PM +0200 8/2/05, Havasvölgyi Ottó wrote: Hi, Now I am at 7 MB, and the reading speed is 3-4KB/sec. Have you checked to see if you're swapping as this goes on, either in the client or on the server? - Original Message - From: "Havasvölgyi Ottó" <[EMAIL P

Re: unicode error on win32 Was: Re: [GENERAL] pgmonitor

2005-08-02 Thread Magnus Hagander
> Hi Magnus, > > the docmentation does not realy help me ! > > Client: Win2k, german language settings, SET client_encoding > TO 'UNICODE' > Server: Win2k, german language settings, database with > UNICODE encoding > > I use PostgreSQL via ODBC and want to write and read strings > containing

Re: [GENERAL] Slow Inserts on 1 table?

2005-08-02 Thread Dan Armbrust
Dan Armbrust wrote: I have one particular insert query that is running orders of magnitude slower than other insert queries, and I cannot understand why. For example, Inserts into "conceptProperty" (detailed below) are at least 5 times faster than inserts into "conceptPropertyMultiAttributes".

Re: [GENERAL] System catalog diagram

2005-08-02 Thread Samuel Thoraval
Reading through "Chapter 41. System Catalogs" down to sub chapter "pg_type" I could actually easily get the namespace's OID from table pg_namespce:  pg_namespace.oid. So sorry, may be reading through the documentation is good enough and not so difficult :-[  ... Samuel Thoraval a écrit :

Re: [GENERAL] Problem with dropping a tablespace

2005-08-02 Thread Oliver Siegmar
On Tuesday 02 August 2005 15:16, Michael Fuhr wrote: > > This directory indeed contains a subdirectory named 595675173 (the > > ghost's database oid ;-)) > > Does that subdirectory contain anything? That's part of why I asked > for the "ls -alR" output; I was also curious to see if there were > an

Re: [GENERAL] Problem with dropping a tablespace

2005-08-02 Thread Michael Fuhr
On Tue, Aug 02, 2005 at 08:00:28AM +0200, Oliver Siegmar wrote: > On Monday 01 August 2005 22:15, Michael Fuhr wrote: > > On Mon, Aug 01, 2005 at 09:28:07PM +0200, Oliver Siegmar wrote: > > > How may I delete the tablespace manually? > > > > Perhaps a better question to ask is: why does pg_tablespa

[GENERAL] CLUSTER equivalent

2005-08-02 Thread Kevin Murphy
Are the two following options equivalent? OPTION A (ordered insert): CREATE TABLE table1 (cluster_col TEXT, col2 INTEGER); CREATE INDEX idx1 ON table1(cluster_col); INSERT INTO table1 (cluster_col, col2) SELECT cluster_col, col2 FROM table1 ORDER BY cluster_col; OPTION B (unordered insert fol

Re: [GENERAL] feeding big script to psql

2005-08-02 Thread Dan Sugalski
At 1:57 PM +0200 8/2/05, Havasvölgyi Ottó wrote: Hi, Now I am at 7 MB, and the reading speed is 3-4KB/sec. Have you checked to see if you're swapping as this goes on, either in the client or on the server? - Original Message - From: "Havasvölgyi Ottó" <[EMAIL PROTECTED]> To: Sent

Re: [GENERAL] Indexes

2005-08-02 Thread Jake Stride
Peter Wilson wrote: > Jake Stride wrote: >> Hi, >> >> I have a table set up: >> >> \d companycontactmethod >> Table "public.companycontactmethod" >> Column | Type| Modifiers >> ---+---+ >> tag | character varyi

[GENERAL] System catalog diagram

2005-08-02 Thread Samuel Thoraval
Hi, does anybody have a complete diagram showing the system catalog tables with their attributes and associations ? I could only find one for the major system catalogs at http://www.ninthwonder.com/info/postgres/programmer/extend289.htm . I find it difficult to find out which pg table holds

Re: [GENERAL] Indexes

2005-08-02 Thread Richard Huxton
Jake Stride wrote: explain analyse SELECT companycontactmethod.tag, companycontactmethod.contact, companycontactmethod."type", companycontactmethod.companyid FROM companycontactmethod WHERE companycontactmethod.main AND companycontactmethod.type = 'E';

Re: [GENERAL] Indexes

2005-08-02 Thread Peter Wilson
Jake Stride wrote: Hi, I have a table set up: \d companycontactmethod Table "public.companycontactmethod" Column | Type| Modifiers ---+---+ tag | character varying | not null contact | character varying

Re: unicode error on win32 Was: Re: [GENERAL] pgmonitor

2005-08-02 Thread Josef Springer
Title: Signature Hi Magnus, the docmentation does not realy help me ! Client: Win2k, german language settings, SET client_encoding TO 'UNICODE' Server: Win2k, german language settings, database with UNICODE encoding I use PostgreSQL via ODBC and want to write and read strings containing vovel

Re: [GENERAL] Indexes

2005-08-02 Thread Kilian Hagemann
On Tuesday 02 August 2005 13:52, Jake Stride pondered: > Hi, > > I have a table set up: > > \d companycontactmethod > Table "public.companycontactmethod" > Column | Type| Modifiers > ---+---+ > tag | character

Re: [GENERAL] feeding big script to psql

2005-08-02 Thread Havasvölgyi Ottó
Hi, Now I am at 7 MB, and the reading speed is 3-4KB/sec. Best Regards, Otto - Original Message - From: "Havasvölgyi Ottó" <[EMAIL PROTECTED]> To: Sent: Tuesday, August 02, 2005 1:31 PM Subject: Re: [GENERAL] feeding big script to psql Hi, The effect is the same even if I redire

[GENERAL] Indexes

2005-08-02 Thread Jake Stride
Hi, I have a table set up: \d companycontactmethod Table "public.companycontactmethod" Column | Type| Modifiers ---+---+ tag | character varying | not null contact | character varying | not null type

Re: unicode error on win32 Was: Re: [GENERAL] pgmonitor

2005-08-02 Thread Magnus Hagander
See http://www.postgresql.org/docs/faqs.FAQ_windows.html#2.6. //Magnus > -Original Message- > Sent: Tuesday, August 02, 2005 1:11 PM > To: pgsql-general@postgresql.org > Subject: Re: unicode error on win32 Was: Re: [GENERAL] pgmonitor > > I use a database with UNIBASE encoding too. Writ

Re: [GENERAL] feeding big script to psql

2005-08-02 Thread Havasvölgyi Ottó
Hi, The effect is the same even if I redirect the output to file with the -o switch. At the beginning 200 KB/sec, at 1.5 MB the speed is less than 20 KB/sec. Best Regards, Otto - Original Message - From: "Havasvölgyi Ottó" <[EMAIL PROTECTED]> To: "Tom Lane" <[EMAIL PROTECTED]> Cc:

Re: unicode error on win32 Was: Re: [GENERAL] pgmonitor

2005-08-02 Thread Josef Springer
Title: Signature I use a database with UNIBASE encoding too. Writing strings in unicode with german vovels does not work. We access the database via the ODBC driver. What kind of documentation do you mean with You may check your documentation ? Best regards, Josef Springer Tino Wildenhain wr

Re: [GENERAL] feeding big script to psql

2005-08-02 Thread Havasvölgyi Ottó
Tom, Thanks for the suggestion. I have just applied both switch , -f (I have applied this in the previous case too) and -n, but it becomes slow again. At the beginning it reads about 300 KB a second, and when it has read 1.5 MB, it reads only about 10 KB a second, it slows down gradually. Mayb

Re: [GENERAL] pgmonitor

2005-08-02 Thread stefan
> i want to list non-system tables with psql and get the following error. any > alternatives? Thanks. > > EPost-# \dt > ERROR: invalid byte sequence for encoding "UNICODE": 0xed > > my database used UNICODE as the encoding. and the OS is win2k pro wich > simplified chinese > as default language.

Re: unicode error on win32 Was: Re: [GENERAL] pgmonitor

2005-08-02 Thread Tino Wildenhain
Am Montag, den 01.08.2005, 16:19 -0600 schrieb YL: > i want to list non-system tables with psql and get the following error. any > alternatives? Thanks. > > EPost-# \dt > ERROR: invalid byte sequence for encoding "UNICODE": 0xed > > my database used UNICODE as the encoding. and the OS is win2k p