Re: [GENERAL] Query with "like" is really slow

2007-09-09 Thread Christian Schröder
Gregory Stark wrote: 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

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

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 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

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: > < 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 Carlo Stonebanks
< Do you mean that an EXPLAIN ANALYZE that runs longer than the actual query is a symptom of time being lost to a function call? ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/

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