pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mirek Budzanowski <mirekb@tcs.uni.wroc.pl>
To: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] How to Make Case InSensitive???
Date: Mon, 21 Sep 1998 21:07:05 +0200 (METDST)
Message-ID: <199809211907.VAA17602@hps.ii.uni.wroc.pl> (raw)


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


Mirek




view thread (11+ messages)  latest in thread

Message-ID: <199809211907.VAA17602@hps.ii.uni.wroc.pl>
Permalink:  ../199809211907.VAA17602@hps.ii.uni.wroc.pl/
Also on:    postgresql.org/message-id/199809211907.VAA17602@hps.ii.uni.wroc.pl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: mirekb@tcs.uni.wroc.pl
  Subject: Re: [SQL] How to Make Case InSensitive???
  In-Reply-To: <199809211907.VAA17602@hps.ii.uni.wroc.pl>
  References: <199809211907.VAA17602@hps.ii.uni.wroc.pl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox