Working tablespace use. ***

Fernando Estevez

Working tablespace use. ***
Hello to all:
Can somebody explain to me, that way uses the db2 its
working tablespaces?
Does it use the first one until draining it and then it does continue
with the second and so on, or does it use them in distributed form?

TIA.

--
Fernando Estévez - Tecnología / DBA
Banco Río - Santander Central Hispano
Phone: 54-11-4341-1000 Ext. 6651


************************************************************************
Visite http://www.bancorio.com.ar y tenga el Banco al alcance de su mano.
************************************************************************

NOTA DE CONFIDENCIALIDAD / CONFIDENTIALITY NOTE
Este mensaje (y sus anexos) es confidencial y puede contener informacion
(i) de propiedad exclusiva de Banco Rio de la Plata S.A. sus afiliadas o
subsidiarias; o (ii) amparada por el secreto profesional. Si usted ha
recibido este fax o e-mail por error, por favor comuniquelo
inmediatamente via fax o e-mail y tenga la amabilidad de destruirlo; no
debera copiar el mensaje ni divulgar su contenido a ninguna persona.
Muchas gracias.

This message (including attachments) is confidential. It may also
contain information that (i) is exclusively property of Banco Rio de la
Plata S.A. or its affiliates or subsidiaries; or (ii) is privileged or
otherwise legally exempt from disclosure. If you have received it by
mistake please let us know by fax or e-mail immediately and destroy or
delete it from your files or system; you should also not copy the
message nor disclose its contents to anyone. Thank you.
**************************************************************************



[login to unmask email]

Re: Working tablespace use. ***
(in response to Fernando Estevez)
LRU algorhythm I think; each may contain multiple user work pagesets.

George



Isaac Yassin

Re: Working tablespace use. ***
(in response to truman.g.brown@VERIZON.COM)
Hi,

Look at Admin. Guide:

Understanding how sort work files are allocated

The sort begins with the input phase when ordered sets of rows are written to work

files.At the end of the input phase,when all the rows have been sorted and

inserted into the work files,the work files are merged together,if necessary,into

one work file containing the sorted data.The merge phase is skipped if there is only

one work file at the end of the input phase.In some cases,intermediate merging

might be needed if the maximum number of sort work files has been allocated.

The work files used in sort are logical work files,which reside in work file table

spaces in your work file database (which is DSNDB07 in a non data-sharing

environment).DB2 uses the buffer pool when writing to the logical work file.The

number of work files that can be used for sorting is limited only by the buffer pool

size when you have the sort assist hardware.

If you do not have the sort hardware,up to 140 logical work files can be allocated

per sort,and up to 255 work files can be allocated per user.

It is possible for a sort to complete in the buffer pool without I/Os.This is the ideal

situation,but it might be unlikely,especially if the amount of data being sorted is

large.The sort row size is actually made up of the columns being sorted (the sort

key length)and the columns the user selects (the sort data length).Having a very

large virtual pool for sort activity can help avoid disk I/Os-consider using data

spaces if your DB2 subsystem runs on a z900 server.(See "Advantages of data

spaces"on page 553 for more details.)

|.When your application needs to sort data,the work files are allocated on a least

recently used basis for a particular sort.For example,if five logical work files

(LWFs)are to be used in the sort,and the installation has three work file table

spaces (WFTSs)allocated,then:

v LWF 1 would be on WFTS 1.

v LWF 2 would be on WFTS 2.

v LWF 3 would be on WFTS 3.

v LWF 4 would be on WFTS 1.

v LWF 5 would be on WFTS 2.

To support large sorts,DB2 can allocate a single logical work file to several physical

work file table spaces.

Isaac Yassin
DBMS & IT Consultant
IBM Certified Solution Expert
DB2 V7.1 Database Administration for OS/390
[login to unmask email]
----- Original Message -----
From: "Fernando Estevez" <[login to unmask email]>
Newsgroups: bit.listserv.db2-l
To: <[login to unmask email]>
Sent: Thursday, December 20, 2001 7:49 PM
Subject: Working tablespace use. ***


> Hello to all:
> Can somebody explain to me, that way uses the db2 its
> working tablespaces?
> Does it use the first one until draining it and then it does continue
> with the second and so on, or does it use them in distributed form?
>
> TIA.
>
> --
> Fernando Estévez - Tecnología / DBA
> Banco Río - Santander Central Hispano
> Phone: 54-11-4341-1000 Ext. 6651
>
>
> ************************************************************************
> Visite http://www.bancorio.com.ar y tenga el Banco al alcance de su mano.
> ************************************************************************
>
> NOTA DE CONFIDENCIALIDAD / CONFIDENTIALITY NOTE
> Este mensaje (y sus anexos) es confidencial y puede contener informacion
> (i) de propiedad exclusiva de Banco Rio de la Plata S.A. sus afiliadas o
> subsidiarias; o (ii) amparada por el secreto profesional. Si usted ha
> recibido este fax o e-mail por error, por favor comuniquelo
> inmediatamente via fax o e-mail y tenga la amabilidad de destruirlo; no
> debera copiar el mensaje ni divulgar su contenido a ninguna persona.
> Muchas gracias.
>
> This message (including attachments) is confidential. It may also
> contain information that (i) is exclusively property of Banco Rio de la
> Plata S.A. or its affiliates or subsidiaries; or (ii) is privileged or
> otherwise legally exempt from disclosure. If you have received it by
> mistake please let us know by fax or e-mail immediately and destroy or
> delete it from your files or system; you should also not copy the
> message nor disclose its contents to anyone. Thank you.
> **************************************************************************
>
>
> DB2-L webpage at http://www.ryci.com/db2-l. The
owners of the list can
>



Max Scarpa

Re: Working tablespace use. ***
(in response to Isaac Yassin)
Hi

Other than the manuals suggested by Isaac Yassin take a look at:

'The mystery of sort in DB2'
by Mary Petras, IDUG Solution Journal, Vol 8 number 2 (www.idug.org)
available online

'DB2 Access Paths By The Numbers'
Chuck Hoover's series (nice articles which explains (among others) the
break-even point to use internal or external sort)

Just my .00000002 (n)euro

MaX(mas) Scarpa