Re: Slow update query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
> for the table).
> 
> 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 vacuum obviously) is executed in 11 second).

It might be worth measuring using psql's \timing to see how long the
update and the vacuum take individually.

--
Craig Ringer

-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux