Re: [SQL] How to Make Case InSensitive???

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: mirekb(at)tcs(dot)uni(dot)wroc(dot)pl (Mirek Budzanowski)
Cc: pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] How to Make Case InSensitive???
Date: 1998-09-22 16:47:49
Message-ID: 199809221647.MAA17617@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

[Charset ISO-8859-2 unsupported, filtering to ASCII...]
>
> > > I working with a table of about 70'000 records and I made 2 tests about
> > > the optimisation of ~* :
> > >
> > > With ~* :
>
> > > real 11.52 *
> > > user 0.02
> > > sys 0.01
> > >
> > > With upper(...) and like upper(%...%)
> > > --------------------------------------
>
> > > real 4.44 *
> > > user 0.03
> > > sys 0.00
> > >
> > > Relsult: it seem to be 2.6 time more optimised to use upper(...) like
> > > upper('%...%') ???
>
> > This is interesting. Does anyone have an idea why this is happening?
>
> In my opinion the reason why regular expresion matching is sloer is
> obvious. Regulars expresion are very powerfull, but the code that
> does the matching is a bit more complicated. With like expresions
> you may write simple and faster code.

Makes sense.

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
http://www.op.net/~candle | (610) 353-9879(w)
+ If your life is a hard drive, | (610) 853-3000(h)
+ Christ can be your backup. |

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Colin Dick 1998-09-22 17:01:30 2 questions.
Previous Message Mirek Budzanowski 1998-09-21 19:07:05 Re: [SQL] How to Make Case InSensitive???