473,395 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

tablespace scan, but not table scan

just got out of a "class" on EXPLAIN, from a 390/v6 maven. was told
that ACCESSTYPE = 'R' in the plan_table meant a TableSpace scan.
hmmmm. next step up (or down, depending on your outlook) wasn't a
Table Scan.

thought this might be a MainFrame thing; but a look at DB2Info on my
UDB 7.2 server showed the same thing.

this is truly puzzling. is there an explanation of EXPLAIN which
describes how to get a Table Scan???? or are we stuck with a scan
of the TableSpace if there is no index support on the Table??? nothing
in between??

thanks,
robert
Nov 12 '05 #1
6 5686
"robert" <gn*****@rcn.com> wrote in message
news:da*************************@posting.google.co m...
just got out of a "class" on EXPLAIN, from a 390/v6 maven. was told
that ACCESSTYPE = 'R' in the plan_table meant a TableSpace scan.
hmmmm. next step up (or down, depending on your outlook) wasn't a
Table Scan.

thought this might be a MainFrame thing; but a look at DB2Info on my
UDB 7.2 server showed the same thing.

this is truly puzzling. is there an explanation of EXPLAIN which
describes how to get a Table Scan???? or are we stuck with a scan
of the TableSpace if there is no index support on the Table??? nothing
in between??

thanks,
robert


If the OS/390 tablespace is simple or partitioned, DB2 will scan the entire
tablespace. For these, it is obviously best to have only one table per
tablespace.

If the tablespace is segmented, a tablespace scan will only scan those
segments belonging to the table in question (and not other tables in that
tablespace).
Nov 12 '05 #2
"robert" <gn*****@rcn.com> wrote in message
news:da*************************@posting.google.co m...
just got out of a "class" on EXPLAIN, from a 390/v6 maven. was told
that ACCESSTYPE = 'R' in the plan_table meant a TableSpace scan.
hmmmm. next step up (or down, depending on your outlook) wasn't a
Table Scan.

thought this might be a MainFrame thing; but a look at DB2Info on my
UDB 7.2 server showed the same thing.

this is truly puzzling. is there an explanation of EXPLAIN which
describes how to get a Table Scan???? or are we stuck with a scan
of the TableSpace if there is no index support on the Table??? nothing
in between??

thanks,
robert


If the OS/390 tablespace is simple or partitioned, DB2 will scan the entire
tablespace. For these, it is obviously best to have only one table per
tablespace.

If the tablespace is segmented, a tablespace scan will only scan those
segments belonging to the table in question (and not other tables in that
tablespace).
Nov 12 '05 #3
"Mark A" <ma@switchboard.net> wrote in message news:<mO****************@news.uswest.net>...
"robert" <gn*****@rcn.com> wrote in message
news:da*************************@posting.google.co m...
just got out of a "class" on EXPLAIN, from a 390/v6 maven. was told
that ACCESSTYPE = 'R' in the plan_table meant a TableSpace scan.
hmmmm. next step up (or down, depending on your outlook) wasn't a
Table Scan.

thought this might be a MainFrame thing; but a look at DB2Info on my
UDB 7.2 server showed the same thing.

this is truly puzzling. is there an explanation of EXPLAIN which
describes how to get a Table Scan???? or are we stuck with a scan
of the TableSpace if there is no index support on the Table??? nothing
in between??

thanks,
robert


If the OS/390 tablespace is simple or partitioned, DB2 will scan the entire
tablespace. For these, it is obviously best to have only one table per
tablespace.

If the tablespace is segmented, a tablespace scan will only scan those
segments belonging to the table in question (and not other tables in that
tablespace).


getting a bit further afield: my understanding of the idea of tablespace
is to keep related tables together. the notion of replacing a table
as if it were a file isn't relational; it's VSAM or dBaseII. if a table
gets corrupted, one replaces the tablespace from which it came, thus
preserving not just the physical data, but the logical too; eg, orders
and order_lines in one tablespace.

the result of this (DB2) design is to severely penalize the DBA/designer
who doesn't provide indexes. i guess that's OK; but it seems to me just a
bit odd not to support a table scan when DB2 forces each table into an OS
file. it isn't as if DB2 didn't have each table's physical storage
(separate from any higher level storage object [aka tablespace])
readily to hand.

maybe Serge can illuminate??

robert
Nov 12 '05 #4
"Mark A" <ma@switchboard.net> wrote in message news:<mO****************@news.uswest.net>...
"robert" <gn*****@rcn.com> wrote in message
news:da*************************@posting.google.co m...
just got out of a "class" on EXPLAIN, from a 390/v6 maven. was told
that ACCESSTYPE = 'R' in the plan_table meant a TableSpace scan.
hmmmm. next step up (or down, depending on your outlook) wasn't a
Table Scan.

thought this might be a MainFrame thing; but a look at DB2Info on my
UDB 7.2 server showed the same thing.

this is truly puzzling. is there an explanation of EXPLAIN which
describes how to get a Table Scan???? or are we stuck with a scan
of the TableSpace if there is no index support on the Table??? nothing
in between??

thanks,
robert


If the OS/390 tablespace is simple or partitioned, DB2 will scan the entire
tablespace. For these, it is obviously best to have only one table per
tablespace.

If the tablespace is segmented, a tablespace scan will only scan those
segments belonging to the table in question (and not other tables in that
tablespace).


getting a bit further afield: my understanding of the idea of tablespace
is to keep related tables together. the notion of replacing a table
as if it were a file isn't relational; it's VSAM or dBaseII. if a table
gets corrupted, one replaces the tablespace from which it came, thus
preserving not just the physical data, but the logical too; eg, orders
and order_lines in one tablespace.

the result of this (DB2) design is to severely penalize the DBA/designer
who doesn't provide indexes. i guess that's OK; but it seems to me just a
bit odd not to support a table scan when DB2 forces each table into an OS
file. it isn't as if DB2 didn't have each table's physical storage
(separate from any higher level storage object [aka tablespace])
readily to hand.

maybe Serge can illuminate??

robert
Nov 12 '05 #5
> > If the OS/390 tablespace is simple or partitioned, DB2 will scan the
entire
tablespace. For these, it is obviously best to have only one table per
tablespace.

If the tablespace is segmented, a tablespace scan will only scan those
segments belonging to the table in question (and not other tables in that tablespace).


getting a bit further afield: my understanding of the idea of tablespace
is to keep related tables together. the notion of replacing a table
as if it were a file isn't relational; it's VSAM or dBaseII. if a table
gets corrupted, one replaces the tablespace from which it came, thus
preserving not just the physical data, but the logical too; eg, orders
and order_lines in one tablespace.

the result of this (DB2) design is to severely penalize the DBA/designer
who doesn't provide indexes. i guess that's OK; but it seems to me just a
bit odd not to support a table scan when DB2 forces each table into an OS
file. it isn't as if DB2 didn't have each table's physical storage
(separate from any higher level storage object [aka tablespace])
readily to hand.

maybe Serge can illuminate??

robert


Maybe we are confusing OS/390 with DB2 for Unix, Linux, and Windows. A
tablespace scan on DB2 for Unix, Linux, and Windows only scans the table.
The terminology is a bit confusing because tablespace scan originally came
from DB2 for OS/390 (MVS back then), and segmented tablespaces were not in
the initial implementation of DB2. So initially, a tablespace scan would
scan all the tables in the tables, but when segmented tablespaces were later
introduced for DB2 for OS/390, and for all tablespaces in DB2 for Unix,
Linux, and Windows, that is not true, even though the phrase tablespace scan
still survives.

Combining tables in a single tablespace has many purposes. These days it is
mostly a matter of administrative convenience. In most databases, the
relationships between tables (with declared or undeclared RI) are so complex
that not all related tables can be in the same tablespace.

So I think your conclusion that DB2 does not support table scans is
incorrect and is just a terminology problem. The only exception is a simple
or partitioned tablespace on OS/390, but any decent DBA should know to use
segmented tablespaces in this circumstance. In fact, most DBA's use
segmented tablespaces for everything (except for partitioned where it would
not be reasonable to have multiple tables defined in the same tablespace).
Nov 12 '05 #6
> > If the OS/390 tablespace is simple or partitioned, DB2 will scan the
entire
tablespace. For these, it is obviously best to have only one table per
tablespace.

If the tablespace is segmented, a tablespace scan will only scan those
segments belonging to the table in question (and not other tables in that tablespace).


getting a bit further afield: my understanding of the idea of tablespace
is to keep related tables together. the notion of replacing a table
as if it were a file isn't relational; it's VSAM or dBaseII. if a table
gets corrupted, one replaces the tablespace from which it came, thus
preserving not just the physical data, but the logical too; eg, orders
and order_lines in one tablespace.

the result of this (DB2) design is to severely penalize the DBA/designer
who doesn't provide indexes. i guess that's OK; but it seems to me just a
bit odd not to support a table scan when DB2 forces each table into an OS
file. it isn't as if DB2 didn't have each table's physical storage
(separate from any higher level storage object [aka tablespace])
readily to hand.

maybe Serge can illuminate??

robert


Maybe we are confusing OS/390 with DB2 for Unix, Linux, and Windows. A
tablespace scan on DB2 for Unix, Linux, and Windows only scans the table.
The terminology is a bit confusing because tablespace scan originally came
from DB2 for OS/390 (MVS back then), and segmented tablespaces were not in
the initial implementation of DB2. So initially, a tablespace scan would
scan all the tables in the tables, but when segmented tablespaces were later
introduced for DB2 for OS/390, and for all tablespaces in DB2 for Unix,
Linux, and Windows, that is not true, even though the phrase tablespace scan
still survives.

Combining tables in a single tablespace has many purposes. These days it is
mostly a matter of administrative convenience. In most databases, the
relationships between tables (with declared or undeclared RI) are so complex
that not all related tables can be in the same tablespace.

So I think your conclusion that DB2 does not support table scans is
incorrect and is just a terminology problem. The only exception is a simple
or partitioned tablespace on OS/390, but any decent DBA should know to use
segmented tablespaces in this circumstance. In fact, most DBA's use
segmented tablespaces for everything (except for partitioned where it would
not be reasonable to have multiple tables defined in the same tablespace).
Nov 12 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: sandeep G | last post by:
I've a table which has a number & a blob column, both of which are NOT NULL type. This table is composite partitioned using range & hash on the same column. Each partition is sub partitioned into...
1
by: Jens H. Hamann | last post by:
Hi, I am having a strange problem with the storage parameters in Oracle 9.2.0.1 database. I create a tablespace with some default storage parameters but when i am adding a table to the tablespace...
1
by: xixi | last post by:
There is one thing I don't understand, I have default tablespace userspace1 is database managed type, with total freepages 506048. another one called tmpxx is DMS type too, with 525120 free pages....
0
by: robert | last post by:
just got out of a "class" on EXPLAIN, from a 390/v6 maven. was told that ACCESSTYPE = 'R' in the plan_table meant a TableSpace scan. hmmmm. next step up (or down, depending on your outlook)...
5
by: Christian Traber | last post by:
Hi! just playing with tablespaces... - moved a existing table to a new tablespace - tried to move it back to default tablespace (ALTER TABLE accounts SET TABLESPACE pg_default;) Got the...
2
by: Raghava | last post by:
hi all, i was working on DB2 and came across an issue. i.e. can a tablespace be rollforwarded to POINT-IN-TIME? the scenario is as follows: i created a data base and a tablespace in it. i have...
2
by: vj_dba | last post by:
Hi Group, I have a problem in restoring my tablespace, my database is running in ARCHIVAL logging, I created a tablespace, did some transaction, then took the ONLINE BACKUP of the tablespace....
4
by: Alvin SIU | last post by:
Hi all, I am now doing development using DB2. Q1. There is one tablespace to store 5 tables. But, when in production, there will be one tablespace for EACH of the tables.
3
by: Troels Arvin | last post by:
Hello, A DB2 v. 8 DMS tablespace ran full. Subsequently, almost all data in the tablespace has been deleted, but "LIST TABLESPACES SHOW DETAIL" keeps stating that the tablespace has 0 free...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.