Indexed subfiles are S-L-O-W

Boyle, Joe Joe.Boyle@cognos.com
Fri, 5 Oct 2001 09:21:19 +0100


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_01C14D76.B605FD10
Content-Type: text/plain

Hi all,

I suspect that this platform is mpe/ix, if so, I can tell you that there is
a bug logged, 307103, that reports poor performance when reading from an
indexed subfile( ksam/ksamxl).
  
If you require keyed access to the indexed subfile and you have access to
qtp or qdesign, you might try writing the data to an image detail set rather
than indexed subfile and use the image set for both keyed access and
reporting. 


Alternatively, you could write a second indexed subfile from the original
subfile ( which must now be non indexed in order to recover sequential read
performance ) which reports the key segment and a record count 
( e.g. define recnum int*10 = 1, rep summary segment recnum subtotal, set
sub name indexed... ). 
 

You could then use linkage like that below, which tales advantage of direct
access to a non-indexed subfile

access primary-rec link to segment of * sub2 link to record ( recnum of sub2
- 1 ) of * orig-sub

You would use ( recnum of sub2 - 1 ) because direct rec nums start at 0.



Full example below, where file branches is an image detail set.

create direct subfile - currently your indexed subfile

can cle 
set defaul
acc  branches

set sub nam  bseq keep 

define recnum int*10 =1

rep summ BRANCH-CODE BRANCH   recnum subtot 

build  mkseq


create indexed subfile

can cle 
set defaul
acc  * bseq

set sub  index idxval segment  BRANCH-CODE nam  bidx keep 

define recnum int*10 =1

rep summ BRANCH-CODE recnum subtot 

build  mkidx




can cle 
set defaul
access branches link to BRANCH-CODE of * bidx link to record ( recnum of
bidx - 1 ) of * bseq

rep  BRANCH-CODE of bidx  BRANCH  of bseq  recnum of bidx

build linkit


E.g. 


regards,
Joe Boyle.


-----Original Message-----
From: Mark Stewart [mailto:stewm@canada.com]
Sent: 05 October 2001 02:54
To: dmaclary@wellington.com
Cc: powerh-l@lists.swau.edu
Subject: Re: Indexed subfiles are S-L-O-W



Just one question.  If your only reporting from the subfile why would you
need an index on it?  Index subfiles take longer to create also.  If you do
not need to perform some kind of special linkage that I'd stay away from
indexed subfile unless you need them.

Mark Stewart
Consultants Club Corp.
Windsor, Ontario
1-519-739-0297

On Thu, 04 October 2001, "Maclary, David" wrote:

> Sender: powerh-l-admin@cube.swau.edu
> To: "'powerh-l@lists.swau.edu'" <powerh-l@lists.swau.edu>
> Delivered-To: canada.com%stewm@canada.com
> Received: (cpmta 23742 invoked from network); 4 Oct 2001 12:33:18 -0700
> Received: from cube.swau.edu (205.165.193.254)
> 	by smtp.c009.snv.cp.net (209.228.34.111) with SMTP; 4 Oct 2001
12:33:18 -0700
> Received: from cube.swau.edu (localhost [127.0.0.1])
> by cube.swau.edu (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id OAA13517;
> Thu, 4 Oct 2001 14:16:47 -0500
> Received: from cosmic3.swau.edu (cosmic3.swau.edu [205.165.192.250])
> by cube.swau.edu (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id OAA13495
> for <powerh-l@lists.swau.edu>; Thu, 4 Oct 2001 14:16:45 -0500
> Received: from camcolo2-smrly1.gtei.net (camcolo2-smrly1.gtei.net
[128.11.173.4])
> by cosmic3.swau.edu (8.9.3/8.9.1) with ESMTP id OAA28714
> for <powerh-l@lists.swau.edu>; Thu, 4 Oct 2001 14:16:50 -0500
> Received: from wellington-cp.wellmanage.com (wellington-bh.wellmanage.com
[206.34.112.66])
> by camcolo2-smrly1.gtei.net (Postfix) with SMTP id 570CD318BF
> for <powerh-l@lists.swau.edu>; Thu,
> 	4 Oct 2001 19:16:36 +0000 (GMT)
> Received: from 134.42.51.10 by srv_scan3.wellmanage.com (InterScan E-Mail
VirusWall NT); Thu, 04 Oct 2001 15:16:50 -0400
> Received: by srv_exchg4.wellmanage.com with Internet Mail Service
(5.5.2654.52)
> id <4BT57ZAT>; Thu, 4 Oct 2001 15:16:48 -0400
> Content-Length: 756
> Content-Type: text/plain;
> charset="iso-8859-1"
> X-Received: 4 Oct 2001 19:33:18 GMT
> Errors-To: powerh-l-admin@cube.swau.edu
> Precedence: bulk
> Subject: Indexed subfiles are S-L-O-W
> From: "Maclary, David" <dmaclary@wellington.com>
> List-Id: Cognos PowerHouse 4GL <powerh-l.lists.swau.edu>
> X-Beenthere: powerh-l@lists.swau.edu
> X-Mailman-Version: 1.1
> Return-Path: <powerh-l-admin@lists.swau.edu>
> Mime-Version: 1.0
> Date: Thu, 4 Oct 2001 15:16:45 -0400
> 	X-Mailer: Internet Mail Service (5.5.2654.52)
> Message-Id:
<F4B5574914ADD311888E009027AF5218020CC487@srv_exchg5.wellmanage.com>
> 
> I'm wondering if anyone else has had the following experience...
> 
> In Quiz, I can...
> > ACCESS subfile
> > SET REPORT LIMIT 999999
> > GO
> and it's fast.
> 
> If I create an indexed version of the subfile, and do the same thing...
> > ACCESS subfile
> > SET REPORT LIMIT 999999
> > GO
> it talks a very long time.
> 
> Anyone know why? And how to speed this up?
> 
> Regards,
> David Maclary
> DMaclary@Wellington.Com
> 
> 
> 
> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> Mailing list: powerh-l@lists.swau.edu
> Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
> Unsubscribe: "unsubscribe" 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.


__________________________________________________________
Get your FREE personalized e-mail at http://www.canada.com

= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.swau.edu
Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
Unsubscribe: "unsubscribe" 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.

------_=_NextPart_001_01C14D76.B605FD10
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">



RE: Indexed subfiles are S-L-O-W



Hi all,

I suspect that this platform is mpe/ix, if so, I can = tell you that there is a bug logged, 307103, that reports poor = performance when reading from an indexed subfile( = ksam/ksamxl).

 
If you require keyed access to the indexed subfile = and you have access to qtp or qdesign, you might try writing the data = to an image detail set rather than indexed subfile and use the image = set for both keyed access and reporting.


Alternatively, you could write a second indexed = subfile from the original subfile ( which must now be non indexed in = order to recover sequential read performance ) which reports the key = segment and a record count

( e.g. define recnum int*10 =3D 1, rep summary = segment recnum subtotal, set sub name indexed... ).
 

You could then use linkage like that below, which = tales advantage of direct access to a non-indexed subfile

access primary-rec link to segment of * sub2 link to = record ( recnum of sub2 - 1 ) of * orig-sub

You would use ( recnum of sub2 - 1 ) because direct = rec nums start at 0.



Full example below, where file branches is an image = detail set.

create direct subfile - currently your indexed = subfile

can cle
set defaul
acc  branches

set sub nam  bseq keep

define recnum int*10 =3D1

rep summ BRANCH-CODE BRANCH   recnum subtot =

build  mkseq


create indexed subfile

can cle
set defaul
acc  * bseq

set sub  index idxval segment  BRANCH-CODE = nam  bidx keep

define recnum int*10 =3D1

rep summ BRANCH-CODE recnum subtot

build  mkidx




can cle
set defaul
access branches link to BRANCH-CODE of * bidx link = to record ( recnum of bidx - 1 ) of * bseq

rep  BRANCH-CODE of bidx  BRANCH  of = bseq  recnum of bidx

build linkit


E.g.


regards,
Joe Boyle.


-----Original Message-----
From: Mark Stewart [mailto:stewm@canada.com]
Sent: 05 October 2001 02:54
To: dmaclary@wellington.com
Cc: powerh-l@lists.swau.edu
Subject: Re: Indexed subfiles are S-L-O-W



Just one question.  If your only reporting from = the subfile why would you need an index on it?  Index subfiles = take longer to create also.  If you do not need to perform some = kind of special linkage that I'd stay away from indexed subfile unless = you need them.

Mark Stewart
Consultants Club Corp.
Windsor, Ontario
1-519-739-0297

On Thu, 04 October 2001, "Maclary, David" = wrote:

> Sender: powerh-l-admin@cube.swau.edu
> To: "'powerh-l@lists.swau.edu'" = <powerh-l@lists.swau.edu>
> Delivered-To: = canada.com%stewm@canada.com
> Received: (cpmta 23742 invoked from network); 4 = Oct 2001 12:33:18 -0700
> Received: from cube.swau.edu = (205.165.193.254)
>       by = smtp.c009.snv.cp.net (209.228.34.111) with SMTP; 4 Oct 2001 12:33:18 = -0700
> Received: from cube.swau.edu (localhost = [127.0.0.1])
> by cube.swau.edu (8.9.3/8.9.3/Debian 8.9.3-21) = with ESMTP id OAA13517;
> Thu, 4 Oct 2001 14:16:47 -0500
> Received: from cosmic3.swau.edu = (cosmic3.swau.edu [205.165.192.250])
> by cube.swau.edu (8.9.3/8.9.3/Debian 8.9.3-21) = with ESMTP id OAA13495
> for <powerh-l@lists.swau.edu>; Thu, 4 Oct = 2001 14:16:45 -0500
> Received: from camcolo2-smrly1.gtei.net = (camcolo2-smrly1.gtei.net [128.11.173.4])
> by cosmic3.swau.edu (8.9.3/8.9.1) with ESMTP id = OAA28714
> for <powerh-l@lists.swau.edu>; Thu, 4 Oct = 2001 14:16:50 -0500
> Received: from wellington-cp.wellmanage.com = (wellington-bh.wellmanage.com [206.34.112.66])
> by camcolo2-smrly1.gtei.net (Postfix) with SMTP = id 570CD318BF
> for <powerh-l@lists.swau.edu>; = Thu,
>       4 Oct 2001 = 19:16:36 +0000 (GMT)
> Received: from 134.42.51.10 by = srv_scan3.wellmanage.com (InterScan E-Mail VirusWall NT); Thu, 04 Oct = 2001 15:16:50 -0400

> Received: by srv_exchg4.wellmanage.com with = Internet Mail Service (5.5.2654.52)
> id <4BT57ZAT>; Thu, 4 Oct 2001 15:16:48 = -0400
> Content-Length: 756
> Content-Type: text/plain;
> charset=3D"iso-8859-1"
> X-Received: 4 Oct 2001 19:33:18 GMT
> Errors-To: powerh-l-admin@cube.swau.edu
> Precedence: bulk
> Subject: Indexed subfiles are S-L-O-W
> From: "Maclary, David" = <dmaclary@wellington.com>
> List-Id: Cognos PowerHouse 4GL = <powerh-l.lists.swau.edu>
> X-Beenthere: powerh-l@lists.swau.edu
> X-Mailman-Version: 1.1
> Return-Path: = <powerh-l-admin@lists.swau.edu>
> Mime-Version: 1.0
> Date: Thu, 4 Oct 2001 15:16:45 -0400
>       X-Mailer: = Internet Mail Service (5.5.2654.52)
> Message-Id: = <F4B5574914ADD311888E009027AF5218020CC487@srv_exchg5.wellmanage.com&g= t;
>
> I'm wondering if anyone else has had the = following experience...
>
> In Quiz, I can...
> > ACCESS subfile
> > SET REPORT LIMIT 999999
> > GO
> and it's fast.
>
> If I create an indexed version of the subfile, = and do the same thing...
> > ACCESS subfile
> > SET REPORT LIMIT 999999
> > GO
> it talks a very long time.
>
> Anyone know why? And how to speed this = up?
>
> Regards,
> David Maclary
> DMaclary@Wellington.Com
>
>
>
> =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
> Mailing list: powerh-l@lists.swau.edu
> Subscribe: "subscribe" in message = body to powerh-l-request@lists.swau.edu
> Unsubscribe: "unsubscribe" 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.


__________________________________________________________
Get your FREE personalized e-mail at http://www.canada.com

=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
Mailing list: powerh-l@lists.swau.edu
Subscribe: "subscribe" in message body to = powerh-l-request@lists.swau.edu
Unsubscribe: "unsubscribe" 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.

------_=_NextPart_001_01C14D76.B605FD10--