Re: [bulk] Re: Problem with LIKE-Performance

From: "Tarabas (Manuel Rorarius)" <tarabas(at)tarabas(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: [bulk] Re: Problem with LIKE-Performance
Date: 2006-04-18 16:04:34
Message-ID: 492687293.20060418180434@tarabas.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi Tom,

TL> As already noted, it might be worth your while to add an index using the
TL> pattern-ops opclass to help with queries like this.

I have done that now and it works very fine as supposed.

The problem with the high startup_costs disappeared somehow after the
change of the enable_seqscan = off and a restart of pg-admin.

first Time I ran the statement it showed 13 sec execution time.

Seq Scan on image image0_ (cost=0.00..21414.21 rows=11 width=1311)
(actual time=10504.138..12857.127 rows=119 loops=1)
Filter: ((title)::text ~~ '%Davorka%'::text)
Total runtime: 12857.372 ms

second time I ran the statement it dropped to ~500 msec , which is
pretty ok. :-)

Seq Scan on image image0_ (cost=0.00..21414.21 rows=11 width=1311)
(actual time=270.289..552.144 rows=119 loops=1)
Filter: ((title)::text ~~ '%Davorka%'::text)
Total runtime: 552.708 ms

Best regards
Manuel Rorarius

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2006-04-18 16:09:57 Re: creating of temporary table takes very long
Previous Message Tom Lane 2006-04-18 15:45:39 Re: Problem with LIKE-Performance