Re: [PERFORM] Optimizing this count query

2005-01-17 Thread Andrei Bintintan
299 width=4) (actual time=101.257..101.257 rows=0 loops=1) -> Seq Scan on endkunde e (cost=0.00..1245.99 rows=44299 width=4) (actual time=0.050..59.641 rows=44301 loops=1) Total runtime: 3033.230 ms Thanks for help. Andy. - Original Message - From: "Tom Lane" <[EMAIL PRO

Re: [PERFORM] Optimizing this count query

2005-01-17 Thread Tom Lane
"Andrei Bintintan" <[EMAIL PROTECTED]> writes: > SELECT count(o.id) FROM orders o > INNER JOIN report r ON o.id=r.id_order > INNER JOIN status s ON o.id_status=s.id > INNER JOIN contact c ON o.id_ag=c.id > INNER JOIN endkunde e ON o.id_endkunde=e.id > INNER JOIN zufrid

[PERFORM] Optimizing this count query

2005-01-17 Thread Andrei Bintintan
Hi to all,   I have a query which counts how many elements I have in the database.   SELECT count(o.id) FROM orders o  INNER JOIN report r ON o.id=r.id_order  INNER JOIN status s ON o.id_status=s.id  INNER JOIN contact c ON o.id_ag=c.id  INNER JOIN endkunde e ON o.id_endk