[PERFORM] Performance improves only after repeated VACUUM/ANALYZE

2007-09-18 Thread Carlo Stonebanks
My client "publishes" an "edition" of their DB from his production site to his hosted web/db server. This is done by FTPing a backup of the DB to his hosting provider. Immediately after a "publication" (restore to web/db server) we immediately run VACUUM ANALYZE to make sure the statistics and row

[PERFORM] Nested loops row estimates always too high

2007-09-18 Thread Carlo Stonebanks
I am noticing that my queries are spending a lot of time in nested loops. The table/index row estimates are not bad, but the nested loops can be off by a factor of 50. In any case, they are always too high. If this is always occurring, is this an indication of a general configuration problem?

Re: [PERFORM] R: DELETE queries slow down

2007-09-18 Thread Bill Moran
In response to "Galantucci Giovanni" <[EMAIL PROTECTED]>: > I perform simple INSERT and simple where-clause DELETE. > I also force a commit after every DELETE. Do you mean that you delete 1 row at a time? This is slower than batching your deletes. > My two tables are about these: > > TABLE_A >

Re: [PERFORM] Query works when kludged, but would prefer "best practice" solution

2007-09-18 Thread Dave Dutcher
I think Tom is talking about something like this: explain select * from foo(); QUERY PLAN -- Function Scan on foo (cost=0.00..12.50 rows=1000 width=50) The planner is estimating the function will r

Re: [PERFORM] Regarding COPY command from Postgres 8.2.0

2007-09-18 Thread Scott Marlowe
On 9/17/07, soni de <[EMAIL PROTECTED]> wrote: > We have upgraded postgres from 7.2.4 to 8.2.0. > We have program which executes COPY command and our new database is changed > having some extra columns in some tables. > Because of this, COPY commands are failing. > So, we wanted the option to COPY

Re: [PERFORM] Regarding COPY command from Postgres 8.2.0

2007-09-18 Thread Evan Carroll
On 9/17/07, soni de <[EMAIL PROTECTED]> wrote: > We have upgraded postgres from 7.2.4 to 8.2.0. This is one of the joys of 8.x over 7.2.x think of it like a different sql product rather than an "upgrade." Its foundations are different. 7.4.x is still supported, and would have been a smoother upgra

Re: [PERFORM] Query works when kludged, but would prefer "best practice" solution

2007-09-18 Thread Tom Lane
"Carlo Stonebanks" <[EMAIL PROTECTED]> writes: > Thanks for the suggestion - this concept is pretty new to me. Can you expand > a bit on the idea of how to place such a "dummy" constraint on a function, > and the conditions on which it affects the planner? Let's say that you know that the function

Re: [PERFORM] Index usage when bitwise operator is used

2007-09-18 Thread valgog
Hi Tom, do you think it would be a good idea to ask GIN index team to implement an int-based bitmap set indexing operator for GIN/GiST based indexes? Or there will be a possibility to somehow optimally index arrays of enumerations to implement such bitmap structures in 8.3 or later postgresql vers

[PERFORM] R: DELETE queries slow down

2007-09-18 Thread Galantucci Giovanni
I perform simple INSERT and simple where-clause DELETE. I also force a commit after every DELETE. My two tables are about these: TABLE_A Column_1 | column2 | ... TABLE_B Column_1B foreign key references TABLE_A(column_1) on delete cascade | . Every row in TABLE_B is also present in T