Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67]) by hub.org (8.8.8/8.8.8) with ESMTP id MAA06052 for ; Tue, 22 Sep 1998 12:53:10 -0400 (EDT) (envelope-from maillist@candle.pha.pa.us) Received: (from maillist@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id MAA17617; Tue, 22 Sep 1998 12:47:49 -0400 (EDT) From: Bruce Momjian Message-Id: <199809221647.MAA17617@candle.pha.pa.us> Subject: Re: [SQL] How to Make Case InSensitive??? In-Reply-To: <199809211907.VAA17602@hps.ii.uni.wroc.pl> from Mirek Budzanowski at "Sep 21, 1998 9: 7: 5 pm" To: mirekb@tcs.uni.wroc.pl (Mirek Budzanowski) Date: Tue, 22 Sep 1998 12:47:49 -0400 (EDT) Cc: pgsql-sql@postgreSQL.org X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit [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@candle.pha.pa.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. |