[PERFORM] Index not used in query. Why?

2004-10-19 Thread Andrei Bintintan
Hi to all! I have the following query. The execution time is very big, it doesn't use the indexes and I don't understand why... SELECT count(o.id) FROM orders o INNER JOIN report r ON o.id=r.id_order INNER JOIN status s ON o

[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

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

[PERFORM] OFFSET impact on Performance???

2005-01-20 Thread Andrei Bintintan
Hi to all, I have the following 2 examples. Now, regarding on the offset if it is small(10) or big(>5) what is the impact on the performance of the query?? I noticed that if I return more data's(columns) or if I make more joins then the query runs even slower if the OFFSET is bigger. Ho

Re: [PERFORM] [SQL] OFFSET impact on Performance???

2005-01-20 Thread Andrei Bintintan
If you're using this to provide "pages" of results, could you use a cursor? What do you mean by that? Cursor? Yes I'm using this to provide "pages", but If I jump to the last pages it goes very slow. Andy. - Original Message - From: "Richard Huxt

Re: [PERFORM] [SQL] OFFSET impact on Performance???

2005-01-21 Thread Andrei Bintintan
DIGGING for solutions. Andy. - Original Message - From: "Ragnar Hafstað" <[EMAIL PROTECTED]> To: Cc: "Andrei Bintintan" <[EMAIL PROTECTED]>; Sent: Thursday, January 20, 2005 9:23 PM Subject: Re: [PERFORM] [SQL] OFFSET impact on Performance??? On Thu, 2005-01-

Re: [PERFORM] [SQL] OFFSET impact on Performance???

2005-01-26 Thread Andrei Bintintan
gards, Andy. - Original Message - From: "Greg Stark" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: "Richard Huxton" ; "Andrei Bintintan" <[EMAIL PROTECTED]>; ; Sent: Tuesday, January 25, 2005 8:28 PM Subject: Re: [PERFORM] [SQL] OFFSET imp

Re: [PERFORM] [ADMIN] Index not used. WHY?

2003-12-05 Thread Andrei Bintintan
Andy. - Original Message - From: "Stephan Szabo" <[EMAIL PROTECTED]> To: "Andrei Bintintan" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, December 04, 2003 5:19 PM Subject: Re: [ADMIN] Index not used. WHY? > &g