Re: [GENERAL] Bad performace of a query

2007-03-01 Thread Kaloyan Iliev
Hi, The index doesn't cost you so much, seq SEQ Scan actully does: Seq Scan on isbns_a_descubrir  (cost=0.00..8067.91 rows=1 width=21) (actual time=30.044..30.044 rows=1 loops=2025) This seq scan is called once for every row of librosdisponibilidadtemp which passes the WHERE condition. So

Re: [GENERAL] Bad performace of a query

2007-03-01 Thread Kaloyan Iliev
Hi, The index doesn't cost you so much, seq SEQ Scan actully does: Seq Scan on isbns_a_descubrir  (cost=0.00..8067.91 rows=1 width=21) (actual time=30.044..30.044 rows=1 loops=2025) This seq scan is called once for every row of librosdisponibilidadtemp which passes the WHERE condition. So He

Re: [GENERAL] Bad performace of a query

2007-02-28 Thread Kaloyan Iliev
Hi, The index doesn't cost you so much, seq SEQ Scan actully does: Seq Scan on isbns_a_descubrir  (cost=0.00..8067.91 rows=1 width=21) (actual time=30.044..30.044 rows=1 loops=2025) This seq scan is called once for every row of librosdisponibilidadtemp which passes the WHERE condition. S

[GENERAL] Bad performace of a query

2007-02-27 Thread Rafa Comino
I have this query: SELECT DISTINCT isbn, CURRENT_TIMESTAMP, 1 FROM librosdisponibilidadtemp WHERE proceso = ai_proceso AND gen_isbn_pais(isbn) IN (SELECT pais FROM raizpaises) AND NOT EXISTS ( SELECT isbn