thanks for your help.
Josh Berkus wrote:
Tony,
I've a query which needs too many time ca. 12-15 sec. how can i get a better perfomance?
First of all, please take this to the PGSQL-PERFORMANCE list.
Second, see this web page: http://techdocs.postgresql.org/guides/SlowQueryPostingGuidelines
i read some tips on the above pages and my database and all my queries run very well. i've optimized the queriey from where ... IN (select ..) to EXISTS and I've done vacumdb full.
my requests last between 0.009 to 0.2 sec compared with 12-15 sec.
i'm very happy.
thanks very much.
tony
explain select o.id from ioobeject o,dist_vertron v where macro_lid=1123 and (o.id=v.id) and (o.deleted<>'1') and (o.status='activo') order by o.ort;
Third, from your explain, ioobject and dist_vertron are obviously somewhat complex views. We need those view definitions, possibly plus schema for the underlying tables (including indexes), or we can't help you.
---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html