Re: [GENERAL] Query with like is really slow

2007-09-09 Thread Christian Schröder
Gregory Stark wrote: Christian Schrder [EMAIL PROTECTED] writes: ... - Seq Scan on table2 (cost=0.00..186.64 rows=2 width=4) (actual time=0.052..2.259 rows=42 loops=1) Filter: (c ~~ '1131%'::text) ... - Seq Scan on table2 (cost=0.00..200.89 rows=14

Re: [GENERAL] Query with like is really slow

2007-09-07 Thread Gregory Stark
Christian Schröder [EMAIL PROTECTED] writes: ... - Seq Scan on table2 (cost=0.00..186.64 rows=2 width=4) (actual time=0.052..2.259 rows=42 loops=1) Filter: (c ~~ '1131%'::text) ... - Seq Scan on table2 (cost=0.00..200.89 rows=14 width=4) (actual time=0.084..3.419 rows=42 loops=1)

Re: [GENERAL] Query with like is really slow

2007-09-07 Thread Carlo Stonebanks
It means that measuring alters the reality. Heisenberg would agree! ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Query with like is really slow

2007-09-07 Thread Alvaro Herrera
Carlo Stonebanks wrote: Actually it's quite possible that that extra overhead in nested loop is largely gettimeofday() calls for the explain analyze. Does the query take less time run without explain analyze than it does run with it? Do you mean that an EXPLAIN ANALYZE that runs longer than

[GENERAL] Query with like is really slow

2007-09-07 Thread Christian Schröder
Hi list, if you please have a look at the following query: SELECT DISTINCT a FROM table1 INNER JOIN table2 USING (b) INNER JOIN view1 USING (a) WHERE c like '1131%' AND d IS NOT NULL AND e IS NOT NULL; Unfortunately, I have not been able to construct a suitable test case, so I had to take the

Re: [GENERAL] Query with like is really slow

2007-09-07 Thread Carlo Stonebanks
Actually it's quite possible that that extra overhead in nested loop is largely gettimeofday() calls for the explain analyze. Does the query take less time run without explain analyze than it does run with it? Do you mean that an EXPLAIN ANALYZE that runs longer than the actual query is a

Re: [GENERAL] Query with like is really slow

2007-09-07 Thread Scott Marlowe
On 9/7/07, Carlo Stonebanks [EMAIL PROTECTED] wrote: It means that measuring alters the reality. Heisenberg would agree! I'm not entirely sure what Schrödinger would think about it. ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Query with like is really slow

2007-09-07 Thread Andrej Ricnik-Bay
On 9/8/07, Scott Marlowe [EMAIL PROTECTED] wrote: Heisenberg would agree! I'm not entirely sure what Schrödinger would think about it. He'd kill Heisenberg's cat? ---(end of broadcast)--- TIP 4: Have you searched our list archives?

Re: [GENERAL] Query with like is really slow

2007-09-07 Thread Carlo Stonebanks
I'm not entirely sure what Schrödinger would think about it. I know what the cat thinks: What do you mean 'no observer'? What the #*! am I??? LET ME OUT! ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster