Received: from hps.ii.uni.wroc.pl (mirekb@hps.ii.uni.wroc.pl [156.17.4.8]) by hub.org (8.8.8/8.8.8) with ESMTP id PAA18949 for ; Mon, 21 Sep 1998 15:06:14 -0400 (EDT) (envelope-from mirekb@hps.ii.uni.wroc.pl) Received: (from mirekb@localhost) by hps.ii.uni.wroc.pl (8.7.6/8.7.3) id VAA17602 for pgsql-sql@postgreSQL.org; Mon, 21 Sep 1998 21:07:05 +0200 (METDST) Date: Mon, 21 Sep 1998 21:07:05 +0200 (METDST) From: Mirek Budzanowski Message-Id: <199809211907.VAA17602@hps.ii.uni.wroc.pl> To: pgsql-sql@postgreSQL.org Subject: Re: [SQL] How to Make Case InSensitive??? Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 7bit Content-MD5: TGolpeS0S6SP+jpHicy66A== > > 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