Re: [PERFORM] Slow update query

2010-01-22 Thread Robert Haas
On Thu, Jan 21, 2010 at 11:14 AM, elias ghanem wrote: > So the average execution time of the function is around 2.5 mins, meaning > that the update query (+ the vacuum) takes 2.5 mins to execute. So is this a > normal behavior? (The same function in oracle with the same environment > (with our vac

Re: [PERFORM] Slow update query

2010-01-21 Thread Craig Ringer
elias ghanem wrote: > Actually this query is inside a function and this function is called > from a .sh file using the following syntax: psql -h $DB_HOST -p $DB_PORT > -d $DB_NAME -U $DB_USER -c "SELECT testupdate()" > > (the function is called 100 times with a vacuum analyze after each call > f

Re: [PERFORM] Slow update query

2010-01-21 Thread Kevin Grittner
"elias ghanem" wrote: > here's more details as you requested You didn't include an EXPLAIN ANALYZE of the UPDATE statement. > -The version of postgres is 8.4 (by the way select pg_version() is > not working but let's concentrate on the query issue) As far as I know, there is no pg_version(

Re: [PERFORM] Slow update query

2010-01-21 Thread Kevin Grittner
"elias ghanem" wrote: > I'm not sure this is the right place to ask my question Yes it is. You gave a lot of good information, but we'd have a better shot at diagnosing the issue with a bit more. Please read the following and resubmit with as much of the requested information as you can. No