473,657 Members | 3,041 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Low cluster ratio - row compression - reorg - V9.1 question.

I have a many row and many column table that is in a 16K page size.
I have four indexes on the table.
I am running row compression on the table.
The table does not have a primary key.
The table does not have a clustered index.
I ran a reorg on the table and the indexes.
I ran runstats on the table and the indexes after the reorg.
Three indexes on the table have an index cluster ratios of 99,99,100
respectively.
The fourth index has a low index cluster ratio(3). The fourth index
had a 96 cluster ratio prior to today.
I'm concerned about the fourth index with the low cluster ratio not
being utilzied by the optimizer.

Example:
Table has 10,000,000.
The fourth index is made up id1,id2.
If I do a select test on the data:
select distinct count(id1) from table x; 1
select distinct count(transsync idcode) from table x; 10,000,000

Why did I lose my 96 index cluster ratio after reorg?
Why does the fourth index have a low index cluster ratio as opposed to
the other indexes?
If I reverse the ids in the fourth index will I get a higher index
cluster ratio?
Suggestions?

Mar 12 '07 #1
2 4774
Assume you have a table with a "date_inser ted" column with an index on
it. Assume also, append mode inserts. All new rows will be inserted at
the end, in date sequence. The index on the column, over a long time
period, will show a very high cluster ratio.

Now, you reorg the table, using an index on "customer_numbe r", another
column of the table. The date index will, after the reorg, have an
extremely low clustering ratio. There's nothing you can go about this,
it's an inherent characteristic of multiple indexes.

If your index with low cardinality is used for retrieving single rows
then the low cardinality doesn't effect the optimizer's use of it.

Clustering indexes significantly decrease data I/O when retrieving
ranges of rows.

I'd be a lot more interested in why, after reorg, you have three indexes
with such high cardinality. This could like a case where your have
multiple indexes with the same first few columns and one or two
different columns making up the low order end of the indexes. If these
are being used to support index only access, it may be possible to
reduce the number of indexes by combining them. This could improve
overall performance. I've also seen this where indexes existed as: index
one - cols A,B,C; index two - cols A,B,C,D; index three - cols A,B,C,E.
If the indexes are not being used for sort avoidance, they can all be
combined into a single index.

Phil Sherman
dunleav1 wrote:
I have a many row and many column table that is in a 16K page size.
I have four indexes on the table.
I am running row compression on the table.
The table does not have a primary key.
The table does not have a clustered index.
I ran a reorg on the table and the indexes.
I ran runstats on the table and the indexes after the reorg.
Three indexes on the table have an index cluster ratios of 99,99,100
respectively.
The fourth index has a low index cluster ratio(3). The fourth index
had a 96 cluster ratio prior to today.
I'm concerned about the fourth index with the low cluster ratio not
being utilzied by the optimizer.

Example:
Table has 10,000,000.
The fourth index is made up id1,id2.
If I do a select test on the data:
select distinct count(id1) from table x; 1
select distinct count(transsync idcode) from table x; 10,000,000

Why did I lose my 96 index cluster ratio after reorg?
Why does the fourth index have a low index cluster ratio as opposed to
the other indexes?
If I reverse the ids in the fourth index will I get a higher index
cluster ratio?
Suggestions?
Mar 13 '07 #2
Thanks Phil.
It makes sense now why I have on low cluster ratio index.

Yes, I have indexes that have some of the same columns. I will look at
combining them in the future.

Mar 14 '07 #3

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

Similar topics

27
7516
by: Raquel | last post by:
This question if for UDB on LUW. Suppose I take regular database backups of my database Monday: database backup <ts1> Tuesday: Tablespace reorged and imagecopied <ts2> Friday: database restored and roll-forwarded to a timestamp <ts3> on Wednesday. Now my question is: because the entire database is being roll-forwarded, I suppose the database roll forward operation will
1
5301
by: Anna Hutter | last post by:
Hello, this question is about DB2 UDB V8 and its inplace reorganisation. It seems that in small tables, an inplace reorg doesn´t start. Is there a limit in size of a table when a reorg starts? How can I be sure that a reorg has successfully finished? I found three methods to watch if an asynchronous reorg has finished: a) db2 "select * from table(sysproc.snapshot_tbreorg('reo_test',0)) as t"
4
8836
by: GB | last post by:
Hi All, I would like to optimize my reorgs. Here are several ways to shorten reorgs or keep data online during reorgs: - db2 reorg has some shrlevel option: reference or change - db2 v7 has an option for reorganizing everything but not the blob's - third party tools like bmc reorg plus - others ?
3
3006
by: datapro01 | last post by:
Running db2 8.1.1 on aix 5.1. Tried to do an offline reorg on the system tables and could not reorg SYSIBM.SYSCOLDIST at about 3.5 million rows. Apparently there was not enough space in the default SYSCATSPACE tablespace in which DB2 could create the 'shadow' table. We are trying to determine the space we would need in a temp tablespace that would be specified in the reorg command. I know I've seen the
6
1702
by: Otto | last post by:
Hi, The application I work on has a table created with a clustered index. A stored procedure that updates this table is then created while the table is empty. As i understand it, the access plan for the stored procedure is determined when the stored procedure is created/compiled. Due to the table being empty, DB2 creates an access plan where a tablescan is used to find the correct row to update. However, as the table grows these updates...
13
4387
by: Yuri | last post by:
We have an update sql that was running OK for several months completing in under 2 minutes . Yesterday something changed and we had to kill this update after it ran more than 6 hours. Update input table contained the normal 100K rows and master table contained about 135 M rows. We reorged the master table specifying the index we wanted DB2 to use in the update, ran runstats and reran the update with the same results (had to cancel it)....
1
1848
by: dunleav1 | last post by:
The table is a many row and many column table that is in a 16K page size. I am running row compression on the table. A have an index that over time have come to have a low index cluster ratio. The table does not have a primary key. I have 3 other indexes on the table and the index cluster ratio is 99% on the other three.
6
2370
by: mike_dba | last post by:
I have been testing compression for update operations. Can anyone tell me why I require more log for an update of a compressed table than I do for the same table that is not compressed ? I tried an update for the same number of rows for two copies of a table, one compressed and one not. The compressed UOW exceeds my log allocation while the non-compressed does not. Thanks
10
3152
by: Ian | last post by:
Henry J. wrote: MDC *guarantees* clustering, whereas a table with a clustering index will eventually require maintenance (a.k.a. reorg) to maintain the cluster ratio. That's not to say that a clustering index isn't still valuable (especially for high cardinality columns that aren't a reasonable candidate as an MDC dimension).
0
8384
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8302
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8499
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8601
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7314
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5630
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.