Hello Kevin, > > You should probably look at reqorking the v_stock view to use joins > instead of subqueries -- they often optimize much better. This is the problem effectively. For creating this view I use a query tools that generate the code, not a good idea. I update and work now :-) Best regards Guy -- Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin