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

2006-04-18 Thread Tarabas (Manuel Rorarius)
Hi Richard, RH> As you can see, the plan is still scanning all the rows. In any case, RH> you've changed the query - this has % at the beginning and end, which no RH> index will help you with. I realize that, the index definately helped a lot with the query where the % is just at the end. The ti

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

2006-04-18 Thread Richard Huxton
Tarabas (Manuel Rorarius) wrote: 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 aft

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

2006-04-18 Thread Tarabas (Manuel Rorarius)
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

Re: [PERFORM] Problem with LIKE-Performance

2006-04-18 Thread Tom Lane
"Tarabas (Manuel Rorarius)" <[EMAIL PROTECTED]> writes: > After removing the enable_seqscan = off and making sure it was gone, > it is a lot faster again. > Now it takes about 469.841 ms for the select. Um, no, enable_seqscan would certainly not have had any effect on the *actual* runtime of this

Re: [PERFORM] Problem with LIKE-Performance

2006-04-18 Thread Guido Neitzer
On 18.04.2006, at 17:16 Uhr, Tarabas (Manuel Rorarius) wrote: Is there any way to speed the like's up with a different locale than C or to get an order by in a different Locale although using the default C locale? Sure. Just create the index with create index __index on ( varchar_pattern_o

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

2006-04-18 Thread Tarabas (Manuel Rorarius)
Hi Hakan, HK> i remember something that you need a special index with locales<>"C". HK> You nned a different operator class for this index smth. like: HK> CREATE INDEX idx_image_title HK> ON image HK> USING btree HK> (title varchar_pattern_ops); I also forgot that, thanks a lot for the hint

Re: [PERFORM] Problem with LIKE-Performance

2006-04-18 Thread REISS Thomas DSIC DESP
Dave Dutcher a écrit : It looks like you are getting a sequential scan instead of an index scan. What is your locale setting? As far as I know Postgres doesn't support using indexes with LIKE unless you are using the C locale. It does if you create your index this way : CREATE INDEX idx_

Re: [PERFORM] Problem with LIKE-Performance

2006-04-18 Thread Hakan Kocaman
ilto:[EMAIL PROTECTED] On Behalf Of > Tarabas (Manuel Rorarius) > Sent: Tuesday, April 18, 2006 4:35 PM > To: pgsql-performance@postgresql.org > Subject: [PERFORM] Problem with LIKE-Performance > > > Hi! > > I am having trouble with like statements on one of my tab

Re: [PERFORM] Problem with LIKE-Performance

2006-04-18 Thread Tarabas (Manuel Rorarius)
Hi Tom, TL> "Tarabas (Manuel Rorarius)" <[EMAIL PROTECTED]> writes: >> I get the following explain and I am troubled by the very high >> "startup_cost" ... does anyone have any idea why that value is so >> high? >> {SEQSCAN >>:startup_cost 1.00 TL> You have enable_seqscan = off, no?

Re: [PERFORM] Problem with LIKE-Performance

2006-04-18 Thread Tom Lane
"Tarabas (Manuel Rorarius)" <[EMAIL PROTECTED]> writes: > I get the following explain and I am troubled by the very high > "startup_cost" ... does anyone have any idea why that value is so > high? > {SEQSCAN >:startup_cost 1.00 You have enable_seqscan = off, no? Please refrain from

Re: [PERFORM] Problem with LIKE-Performance

2006-04-18 Thread Tarabas (Manuel Rorarius)
Hi Dave, DD> It looks like you are getting a sequential scan instead of an index DD> scan. What is your locale setting? As far as I know Postgres doesn't DD> support using indexes with LIKE unless you are using the C locale. Actually no, I am using de_DE as locale because I need the german orde

Re: [PERFORM] Problem with LIKE-Performance

2006-04-18 Thread Dave Dutcher
> -Original Message- > From: [EMAIL PROTECTED] [mailto:pgsql-performance- > [EMAIL PROTECTED] On Behalf Of Tarabas (Manuel Rorarius) > Subject: [PERFORM] Problem with LIKE-Performance > > Hi! > > I am having trouble with like statements on one of my tables.

[PERFORM] Problem with LIKE-Performance

2006-04-18 Thread Tarabas (Manuel Rorarius)
Hi! I am having trouble with like statements on one of my tables. I already tried a vacuum and analyze but with no success. The database is PostgreSQL Database Server 8.1.3 on i686-pc-mingw32 I get the following explain and I am troubled by the very high "startup_cost" ... does anyone hav