Wild Card/Generic retrieval
Deskin, Bob
Bob.Deskin@Cognos.COM
Wed, 10 Sep 2003 15:25:22 -0400
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C377D1.470906F0
Content-Type: text/plain
Thanks Darren for confirming that pattern matching is still quite resource
intensive relative to the other PowerHouse functions. While we can't say
exactly how much more intensive without testing various volumes, I'm not
surprised at these results. What is interesting is how close the other
function tests are.
Bob
-----Original Message-----
From: Darren Reely [mailto:darren.reely@latticesemi.com]
Sent: Wednesday, September 10, 2003 2:57 PM
Cc: powerh-l@lists.swau.edu
Subject: Re: Wild Card/Generic retrieval
I found this interesting enough to 'play' a little with it. I choose the
main table in our Oracle test system containing 1,482,455 rows. I
altered the queries for my known data and limited them to counting.
In this scenario it is obvious to avoid MATCHPATTERN. I've never been
impressed with its performance. Most of the options proposed came in at
around 53 seconds, MATHCPATTERN added 2 minutes to those times!
Not listed here is a combination of the Oracle SQL select as a cursor
for a new version of the quiz file. It took 2 minutes 47 seconds.
At the end of each select statement are the timings.
Oracle SQL - approximately 4 seconds
select count(*)
from lot_step_summ
where lot_id like '%A';
OR
select count(*)
from (select * from lot_step_summ where lot_id like '%A');
COUNT(*)
----------
145878
Powerhouse times
set report nolimit
access lot_step_summ in mfg
;select lot_step_summ if MATCHPATTERN(TRUNCATE(lot_id),"@A") ;; 2
minutes 53 seconds
;select lot_step_summ If 0 = index(lot_id,"A") - size(truncate(lot_id))
;; 53 seconds fetches too many records, no surprise
;select lot_step_summ if 'A' = REVERSE(TRUNCATE( lot_id ))[1:1] ;; 53
seconds
select if "A" = lot_id[ SIZE(TRUNCATE(lot_id)) :
1] ;; 56 seconds
define mycount num = 1
final footing mycount subtotal
go
09/10/2003 mfg
PAGE 1
MYCOUNT
(SUBTOTAL)
145878
Darren
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.swau.edu
Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
Unsubscribe: "unsubscribe <password>" in message body to
powerh-l-request@lists.swau.edu
http://lists.swau.edu/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.
Join us at Cognos' biggest event of the year Enterprise 2003, The Cognos
Business Forum. Taking place in over 25 cities around the world, it's an
opportunity for Business and IT leaders to learn about strategies for
driving performance. Visit http://www.cognos.com/enterprise03 for more
details.
This message may contain privileged and/or confidential information. If you
have received this e-mail in error or are not the intended recipient, you
may not use, copy, disseminate or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so. Thank you.
------_=_NextPart_001_01C377D1.470906F0
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2654.89">
<TITLE>RE: Wild Card/Generic retrieval</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=3D2>Thanks Darren for confirming that pattern matching is =
still quite resource intensive relative to the other PowerHouse =
functions. While we can't say exactly how much more intensive without =
testing various volumes, I'm not surprised at these results. What is =
interesting is how close the other function tests are.</FONT></P>
<P><FONT SIZE=3D2>Bob</FONT>
</P>
<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Darren Reely [<A =
HREF=3D"mailto:darren.reely@latticesemi.com">mailto:darren.reely@lattice=
semi.com</A>]</FONT>
<BR><FONT SIZE=3D2>Sent: Wednesday, September 10, 2003 2:57 PM</FONT>
<BR><FONT SIZE=3D2>Cc: powerh-l@lists.swau.edu</FONT>
<BR><FONT SIZE=3D2>Subject: Re: Wild Card/Generic retrieval</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>I found this interesting enough to 'play' a little =
with it. I choose the </FONT>
<BR><FONT SIZE=3D2>main table in our Oracle test system containing =
1,482,455 rows. I </FONT>
<BR><FONT SIZE=3D2>altered the queries for my known data and limited =
them to counting.</FONT>
</P>
<P><FONT SIZE=3D2>In this scenario it is obvious to avoid MATCHPATTERN. =
I've never been </FONT>
<BR><FONT SIZE=3D2>impressed with its performance. Most of the options =
proposed came in at </FONT>
<BR><FONT SIZE=3D2>around 53 seconds, MATHCPATTERN added 2 minutes to =
those times!</FONT>
</P>
<P><FONT SIZE=3D2>Not listed here is a combination of the Oracle SQL =
select as a cursor </FONT>
<BR><FONT SIZE=3D2>for a new version of the quiz file. It took 2 =
minutes 47 seconds.</FONT>
</P>
<P><FONT SIZE=3D2>At the end of each select statement are the =
timings.</FONT>
</P>
<P><FONT SIZE=3D2>Oracle SQL - approximately 4 seconds</FONT>
</P>
<P><FONT SIZE=3D2>select count(*)</FONT>
<BR><FONT SIZE=3D2>from lot_step_summ</FONT>
<BR><FONT SIZE=3D2>where lot_id like '%A';</FONT>
</P>
<P><FONT SIZE=3D2>OR</FONT>
</P>
<P><FONT SIZE=3D2>select count(*)</FONT>
<BR><FONT SIZE=3D2>from (select * from lot_step_summ where lot_id like =
'%A');</FONT>
</P>
<BR>
<P><FONT SIZE=3D2> COUNT(*)</FONT>
<BR><FONT SIZE=3D2>----------</FONT>
<BR><FONT SIZE=3D2> 145878</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>Powerhouse times</FONT>
</P>
<P><FONT SIZE=3D2>set report nolimit</FONT>
<BR><FONT SIZE=3D2>access lot_step_summ in mfg</FONT>
<BR><FONT SIZE=3D2>;select lot_step_summ if =
MATCHPATTERN(TRUNCATE(lot_id),"@A") ;; 2 </FONT>
<BR><FONT SIZE=3D2>minutes 53 seconds</FONT>
<BR><FONT SIZE=3D2>;select lot_step_summ If 0 =3D =
index(lot_id,"A") - size(truncate(lot_id)) </FONT>
<BR><FONT SIZE=3D2> ;; 53 seconds fetches too many records, no =
surprise</FONT>
<BR><FONT SIZE=3D2>;select lot_step_summ if 'A' =3D REVERSE(TRUNCATE( =
lot_id ))[1:1] ;; 53 </FONT>
<BR><FONT SIZE=3D2>seconds</FONT>
<BR><FONT SIZE=3D2>select if "A" =3D lot_id[ =
SIZE(TRUNCATE(lot_id)) : </FONT>
<BR><FONT =
SIZE=3D2>1] &=
nbsp; &=
nbsp; ;; 56 seconds</FONT>
<BR><FONT SIZE=3D2>define mycount num =3D 1</FONT>
<BR><FONT SIZE=3D2>final footing mycount subtotal</FONT>
<BR><FONT SIZE=3D2>go</FONT>
</P>
<P><FONT =
SIZE=3D2>09/10/2003  =
;  =
; =
mfg &nb=
sp; &nb=
sp; </FONT>
<BR><FONT SIZE=3D2>PAGE 1</FONT>
</P>
<P><FONT SIZE=3D2> MYCOUNT</FONT>
<BR><FONT SIZE=3D2> (SUBTOTAL)</FONT>
</P>
<P><FONT SIZE=3D2> 145878</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>Darren</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>=3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =
=3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D</FONT>
<BR><FONT SIZE=3D2>Mailing list: powerh-l@lists.swau.edu</FONT>
<BR><FONT SIZE=3D2>Subscribe: "subscribe" in message body to =
powerh-l-request@lists.swau.edu</FONT>
<BR><FONT SIZE=3D2>Unsubscribe: "unsubscribe =
<password>" in message body to =
powerh-l-request@lists.swau.edu</FONT>
<BR><FONT SIZE=3D2><A =
HREF=3D"http://lists.swau.edu/mailman/listinfo/powerh-l" =
TARGET=3D"_blank">http://lists.swau.edu/mailman/listinfo/powerh-l</A></F=
ONT>
<BR><FONT SIZE=3D2>This list is closed, thus to post to the list you =
must be a subscriber.</FONT>
</P>
<P><FONT SIZE=3D2>Join us at Cognos' biggest event of the year<I> =
Enterprise 2003, The Cognos Business Forum</I>. Taking place in =
over 25 cities around the world, it's an opportunity for Business and =
IT leaders to learn about strategies for driving performance. Visit<U> =
<A HREF=3D"http://www.cognos.com/enterprise03" =
TARGET=3D"_blank">http://www.cognos.com/enterprise03</A></U> for more =
details. </FONT></P>
<P><FONT SIZE=3D2>This message may contain privileged and/or =
confidential information. If you have received this e-mail in =
error or are not the intended recipient, you may not use, copy, =
disseminate or distribute it; do not open any attachments, delete it =
immediately from your system and notify the sender promptly by e-mail =
that you have done so. Thank you.</FONT></P>
</BODY>
</HTML>
------_=_NextPart_001_01C377D1.470906F0--