Coalesce or compress this index? what is the best solution in this case?
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64biI have executed the following query on a specific index that I suspected to be smashed and got the following result
select
keys_per_leaf, count(*) blocks
from (
select sys_op_lbid (154813, 'L', jus.rowid) block_id,
count (*) keys_per_leaf
from xxx_table jus
where jus.id is not null
or jus.dat is not null
group by sys_op_lbid (154813, 'L', jus.rowid)
group by keys_per_leaf
order by keys_per_leaf;
keys_per_leaf blocks
1 80
2 1108
3 2816
4 3444
5 3512
6 2891
7 2579
8 2154
9 1943
10 1287
11 1222
12 1011
13 822
14 711
15 544
16 508
17 414
18 455
19 425
20 417
21 338
22 337
23 327
24 288
25 267
26 295
27 281
28 266
29 249
30 255
31 237
32 259
33 257
34 232
35 211
36 209
37 204
38 216
39 189
40 194
41 187
42 200
43 183
44 167
45 186
46 179
47 179
48 179
49 171
50 164
51 174
52 157
53 181
54 192
55 178
56 162
57 155
58 160
59 153
60 151
61 133
62 177
63 156
64 167
65 162
66 171
67 154
68 162
69 163
70 153
71 189
72 166
73 164
74 142
75 177
76 148
77 161
78 164
79 133
80 158
81 176
82 189
83 347
84 369
85 239
86 239
87 224
88 227
89 214
90 190
91 230
92 229
93 377
94 276
95 196
96 218
97 217
98 227
99 230
100 251
101 266
102 298
103 276
104 288
105 638
106 1134
107 1152
229 1
230 1 This is a 5 columns unique key index on (id number, dat date, id2 number, dat2 date type number).
Furthermore, a space analysis of this index using dbms_space.space_usage gives the following picture
Number of blocks with at least 0 to 25% free space = 0 -------> total bytes = 0
Number of blocks with at least 25-50% free space = 75 -------> total bytes = ,5859375
Number of Blocks with with at least 50 to 75% free space = 0 -------> Total Bytes = 0
number of blocks with at least 75 to 100% free space = 0 -------> total bytes = 0
Number of full blocks with no free space = 99848 -------> total bytes = 780,0625
Total blocks ______________________________
99923
Total size MB______________________________
799,384It seems for me that this index needs to be either coalesced or compressed.
Then, what would be the best option in your opinion?
Thanks in advance
Mohamed Houri
Edited by: Mohamed Houri on 12-janv.-2011 1:18
So let me continue my case
I first compressed the index as follows
alter index my_index rebuild compress 2;which immediately presents two new situations
(a) index space
Number of blocks with at least 0 to 25% free space = 0 -------> total bytes = 0
Number of blocks with at least 25-50% free space = 40 -------> total bytes =, 3125
Number of Blocks with at least 50 to 75% free space = 0 -------> total Bytes = 0
Number of blocks with at least 75 to 100% free space = 0 -------> total bytes = 0
Number of full blocks with no free space = 32361 -------> total bytes = 252, 8203125
Total blocks ______________________________
32401
Total size Mb______________________________
259,208meaning that the compress command freed up 67487 leaf blocks and reduced the size of the index from to 799,384 MB to 259,208 MB.
It also shows a relative nice pictue of number of keys per leaf block (when compared to the previous situation)
(b) on the number of key per leaf block
KEYS_PER_LEAF BLOCKS
4 1
6 1
13 1
15 1
25 1
62 1
63 1
88 1
97 1
122 1
123 3
124 6
125 4
126 2
289 4489
290 3887
291 3129
292 2273
293 1528
294 913
295 442
296 152
297 50
298 7
299 1 In a second step, I have coalesced the index as follows
alter index my_index coalesce;which produces the new figure
Number of blocks with at least 0 to 25% free space = 0 -------> total bytes = 0
Number of blocks with at least 25-50% free space = 298 -------> total bytes = 2,328125
Number of Blocks with at least 50 to 75% free space = 0 -------> Total Bytes = 0
Number of blocks with at least 75 to 100% free space = 0 -------> total bytes = 0
Number of full blocks with no free space = 32375 -------> total bytes = 252, 9296875
Total blocks ______________________________
32673
Total size MB______________________________
261,384meaning the the coalesce command has made
(a) 298-40 = 258 new blocks with 25-50% of free space
(b) 32375-32361 = 14 new additional blocks which have been made full
(c) The size of the index increased by 2,176MB (261,384-259,208)
While the number of key per leaf block keeps in the same situation
KEYS_PER_LEAF BLOCKS
4 2
5 3
9 1
10 2
12 1
13 1
19 1
31 1
37 1
61 1
63 1
73 1
85 1
88 1
122 1
123 4
124 4
125 3
126 1
289 4492
290 3887
291 3125
292 2273
293 1525
294 913
295 441
296 152
297 50
298 7
299 1 Could you please through some light on the difference between the compress and the coalesce on the effect they have made on
(a) the number of keys per leaf blocks within my index
(b) the space and size of my index?
Best regards
Mohamed Houri
Similar Messages
-
Help Me.
What is the best solution for this problem ?Encore is activated when you activate Premiere Pro... so, as Stan asked, how did you install P-Pro?
Ask for serial number http://forums.adobe.com/thread/1234635 has a FAQ link
-and a fix for Encore http://forums.adobe.com/thread/1421765?tstart=0 in reply #7
-plus more Encore http://helpx.adobe.com/encore/kb/cant-write-image-fie-larger1.html -
Migrated Aperture 3 upgrade from old Mac Book Pro to new Mac Book Pro. Can't open Aperture on new machine because I don't have the original serial number for Aperture 2 program originally installed on the old machine. What is the best solution to this situation
Call Apple and make a appointment.
You have 3 months of care and up to 3 years with paid AppleCare, let them handle it and bring everything in.
Good Luck -
What is the best solution to this problem?
I have so many solutions in mind right now but i am looking for the best solution if possible. i have the following query
SELECT one_query.date_required as Month_id,
nvl(one_query.amount_used, 0) as overalluserhours_A,
nvl(second_query.amount_used_b, 0) as overalluserhours_B,
nvl((trunc(((second_query.amount_used_b/one_query.amount_used) * 100), 2)), 0) as p_change
from
(select to_char(b1.needed_date,'YYYY-MM') as date_required,
SUM(b1.amount_used) as amount_used,
b1.type_id as type_id
from table_one b1
where b1.zone_type like 'NEWYORK%'
and b1.type_id = 'CARS'
and trunc(b1.needed_date) between to_date('2009-01-01', 'YYYY-MM-DD') and to_date('2009-12-31', 'YYYY-MM-DD')
group by to_char(b1.needed_date,'YYYY-MM'), b1.type_id) one_query,
(select to_char(b2.needed_date, 'YYYY-MM') as date_required,
SUM(b2.amount_used) as amount_used_b,
b2.type_id as type_id
from table_one b2
where b2.zone_type like
'CHICAGO%'
and b2.type_id = 'BIKES'
and trunc(b2.needed_date) between to_date('2009-01-01', 'YYYY-MM-DD') and to_date('2009-12-31', 'YYYY-MM-DD')
group by to_char(b2.needed_date, 'YYYY-MM'), b2.type_id)second_query
where one_query.date_required = second_query.date_required(+);the above query is being used on table_one. The current problem I am having is based on the fact that table_one might sometimes contain data for only chicago and not for newyork. in this case, table_one would look like this
identification_id needed_date zone_type type_id
2 3/22/2006 12:00:00 CHICAGO BIKES
3 2/12/2006 12:00:00 CHICAGO BIKEShowever though, in other case, it could be the other way around. in this case, table_one will look like this
identification_id needed_date zone_type type_id
4 4/21/2007 12:00:00 NEWYORK CARS
5 1/12/2007 12:00:00 NEWYORK CARS
and finally table_one could contain information for both cases. hence, we could have the following situation
identification_id needed_date zone_type type_id
6 6/21/2008 12:00:00 NEWYORK BIKES
7 8/12/2008 12:00:00 CHICAGO CARSKindly note, my above query is currently being used inside a function. I know I can write so many if statement to handle but the main issue is regarding the fact, i am also using that query in another query which performs so many union all.I'm not sure how you're going to parameterize it, how those filters change from call to call, but an idea would be something like this:
select date_required month_id,
max(amt_used_chicago_bikes) overalluserhours_A,
max(amt_used_newyork_cars) overalluserhours_B,
(max(amt_used_chicago_bikes) / max(amt_used_newyork_cars)) * 100 p_change
from (select zone_type,
to_char(b1.needed_date, 'YYYY-MM') as date_required,
b1.type_id as type_id,
SUM(case when zone_type like 'CHICAGO%' and type_id = 'BIKES'
then b1.amount_used end) as amt_used_chicago_bikes,
SUM(case when zone_type like 'NEWYORK%' and type_id = 'CARS'
then b1.amount_used end) as amt_used_newyork_cars
from table_one b1
where trunc(b1.needed_date) between
to_date('2009-01-01', 'YYYY-MM-DD') and
to_date('2009-12-31', 'YYYY-MM-DD')
group by b1.zone_type,
to_char(b1.needed_date, 'YYYY-MM'),
b1.type_id)
where amt_used_chicago_bikes is not null or amt_used_newyork_cars is not null
group by date_required;Again, this is not the biggest concern regarding performance and certainly not the best way of doing it. Cracking those 250 lines of SQL and making it optimized would probably be the best way to approach the issue here. -
[Sales/Shipment report] - What's the best solution?
Hello everybody.
I have to develop a report with some sales data, delivery service data and shipment costs data.
I have the cubes: 0SD_C03, 0SD_C04, 0LES_C02.. and I thought to do a multicube, but I don't no how to link these cubes...
I don't have, for example, Sales Document/Item and/or Delivery Document/Item in all os these cubes...
What is the best solution to this sittuation?
I thought in some solutions like...
1 - Extend extractor of 0LES_C02 to include Sales Doc/Item, but I don't know if all delivery doc is related to a sales doc.
2 - I know I have all the fields that I want in the tables VBAP and LIPS...so I thought in create an generic extractor with a view of these two tables, and than creat a Z cube, to receive these datas...
I really don't know whats the best solution, or if there is abother solution to this....
I'll apreciate ideas, or a solution from someone that already face with this and developed a solution.
Best Regards,
ThiagoHi,
Its better for you to add sales order,item in the cubes also from the source where your cube gets data ie from DSO as they are only point through which you can combine sales,delivery and billing data.
Thanks,
Arun -
I am getting pop ups on safari and firefox lately and am worried I may have malware or something now on my computer doing this. What is the best way to check this out for sure and remove it?
Please review the options below to determine which method is best to remove the Adware installed on your computer.
The Easy, safe, effective method:
http://www.adwaremedic.com/index.php
If you are comfortable doing manual file removals use the somewhat more difficult method:
http://support.apple.com/en-us/HT203987
Also read the articles below to be more prepared for the next time there is an issue on your computer.
https://discussions.apple.com/docs/DOC-7471
https://discussions.apple.com/docs/DOC-8071
http://www.thesafemac.com/tech-support-scam-pop-ups/ -
WhatâÃÂÃÂs the best practice for this scenario?
Hi,
My users want the ability to change the WHERE and/or ORDER BY clause at runtime. They may define user preferences on each screen ( which is bind to a view object). They want to see the same records based on WHERE/ORDER BY defined on the last visit. That is why I keep the users preferences and load the screen based on that, using :
View.setWhereClause(...);
View.setOrderByClause(...);
View.executeQuery();
This works good when only one user working with the application but faced low performance when more than one user working with the application.
What are the points to increase the performance and what is the best practice for this scenario?
Thanks for your help in advance.Sung,
I am talking only about 2 users in my testing. I am sure i missed something but could not recognize that.
This page is my custom query page including a tag to instantiate app module in stateful mode at the top <jbo:ApplicationModule..> and a tag to instantiate data source <jbo:Datasource...> and release tag at the bottom <jbo:ReleasePageResources..> and some java code in the middle(body). The java code constructed the query statement and then fires the query to set the view object based on the query statement using the above methods.
So, I am facing very slow performance(speed) when two clients load this page at the same time. Looks like the entire application locks for others when one client load this page and fire the query. i realized the battle neck is where executeQuery() is executing.
what do you think.
Thanks in advance for your comments. -
my daughter is a college student. she needs to write and compile c programs on her mac for a class this semester. what is the best place for her to start to get the correct compiler etc. to use ? thanks
If you know that you will not be asked to design GUI interfaces, and the C programming course will adhere to command line compilation environments, then get the Xcode command-line developer tools, and skip the extra complication of Xcode until you absolutely need it. Apple has kicked GNU C to the curb and is rightly so, using Clang/LLVM compiler technology.
Sign up for a free Apple Developer account using your Apple ID, and then visit the Mac Dev Center, and towards the bottom of the page, you will see additional downloads. Click on the associated, all down loads link. Know your OS X version beforehand, as the command-line tool releases are tied to general operating system versions, and the most recent Xcode version. That said, there are currently two March 9, 2015 command-line tools for Xcode 6.2 — one for OS X 10.9 Mavericks, and the other for OS X Yosemite. -
The charger port pin in an iphone 5 is broken. What are the possible solutions to this issue?
Read: http://support.apple.com/kb/TS4436
It is pretty short so here is the entire text:
Symptoms
A purplish or other colored flare, haze, or spot is imaged from out-of-scene bright light sources during still image or video capture.
Resolution
Most small cameras, including those in every generation of iPhone, may exhibit some form of flare at the edge of the frame when capturing an image with out-of-scene light sources. This can happen when a light source is positioned at an angle (usually just outside the field of view) so that it causes a reflection off the surfaces inside the camera module and onto the camera sensor. Moving the camera slightly to change the position at which the bright light is entering the lens, or shielding the lens with your hand, should minimize or eliminate the effect.
Which is exactly what eelw wrote.
No one on Apple Support Communities has authority to speak on behalf of Apple, unless their avatar is accompanied by this Apple image:
... identifying themselves as Apple employees. -
I have iphone 5, after upgrading it to iOS7, front is working find unfortunately rear camera became blurred, what is the best way to fix this? Looking forward to the best solution of this problem.
WORKAROUND FOUND ! Download and install "Awesome Camera" app and take a picture with that app. After 1-2 seconds of standby, it will work. Then you can go back to default Camera app which would work again.Please let me know
-
Many times my computer takes too long to connect to new website. I have wireless internet (time capsule) and I am running a pretty powerful real time financial work program at same time, what is the best solution? Upgrading speed from cable network? is it a hard drive issue? do I only need to "clean out" the computer? Or all of the above...not to computer saavy. It is a Macbook Pro osx 10.6.8 (late 2010).
Almost certainly none of the above! Try each of the following in this order:
Select 'Reset Safari' from the Safari menu.
Close down Safari; move <home>/Library/Caches/com.apple.Safari/Cache.db to the trash; restart Safari.
Change the DNS servers in your network settings to use the OpenDNS servers: 208.67.222.222 and 208.67.220.220
Turn off DNS pre-fetching by entering the following command in Terminal and restarting Safari:
defaults write com.apple.safari WebKitDNSPrefetchingEnabled -boolean false -
I have three iPhone 4 models purchased in late 2010 (for my family) that all share the same iTunes account for access to apps and music, but each phone/user still has his/her custom contact list, email accts, and select lists of apps and music from the one iTunes acct library. The problem is I can only update the software on one of the three iPhones – the primary phone I used to setup the iTunes acct. What is the best solution to manage these devices for software updates, apps? This is probably a common problem with families wanting to share apps and music without realizing the issues created by this approach. As it stands today... the first (primary) iPhone associated with the iTune acct has been updated with the latest software version 5.1.1 and sync'd up with all the apps, music, etc from the one iTune acct, while the other two iPhones are still running on the original software version 4.0.2 and are experiencing problems now. I was advised by AT&T back in January that it would be necessary to setup separate iTunes accts for the second and third iPhones in order to receive system updates. The problem would be how to keep all the apps, etc from being deleted off the second and third phones that were originally loaded from the one iTunes acct. Since this AT&T advice was prior to iCloud coming out, would iCloud be a better solution or at least part of the solution? I really don't yet understand how iCloud works. Hopefully, someone out there can help me?? Please?
I have three iPhone 4 models purchased in late 2010 (for my family) that all share the same iTunes account for access to apps and music, but each phone/user still has his/her custom contact list, email accts, and select lists of apps and music from the one iTunes acct library. The problem is I can only update the software on one of the three iPhones – the primary phone I used to setup the iTunes acct. What is the best solution to manage these devices for software updates, apps? This is probably a common problem with families wanting to share apps and music without realizing the issues created by this approach. As it stands today... the first (primary) iPhone associated with the iTune acct has been updated with the latest software version 5.1.1 and sync'd up with all the apps, music, etc from the one iTune acct, while the other two iPhones are still running on the original software version 4.0.2 and are experiencing problems now. I was advised by AT&T back in January that it would be necessary to setup separate iTunes accts for the second and third iPhones in order to receive system updates. The problem would be how to keep all the apps, etc from being deleted off the second and third phones that were originally loaded from the one iTunes acct. Since this AT&T advice was prior to iCloud coming out, would iCloud be a better solution or at least part of the solution? I really don't yet understand how iCloud works. Hopefully, someone out there can help me?? Please?
-
My 500 GB can't verify nor repair. I have photoshop work that I need to recover. I would like to know what option would be the best solution for this problem?
You appear to have two issues: 1) a hard drive that is not working properly and 2) files you wish to recover.
Re 1) you need to answer Kappy's questions.
Re 2) does the drive load and can you see your photo files? If so can you copy them to another drive?
Do you not have a backup of the photo files? -
What is the best solution to the earphones problem?? (Ipod shuffle 3rd gen)
Hey guys,
at the end of the day what is the best solution for that problem with the earphones of the new Ipod shuffle? After do some reading through the forums i came up with a couple of solutions that i could probably choose but i am creating that topic as i would like to hear more about your opinions - suggestions.
The first one of the solutions i thought is that i should go and buy one of these..
http://www.amazon.co.uk/Scosche-tapSTICK-IRMC-Controls-Shuffle/dp/B002CVTU5Q/ref =wlit_dpo?ie=UTF8&coliid=I10ZELYHA99O08&colid=2OIMEI23BWJ9Z
What do you guys thing about that? Is that one of the effective solutions?
And the other option that i was considering is to buy one of this:
http://www.amazon.co.uk/Scosche-IRM35-tapLINE-Control-Headphone/dp/B002CVTU56/re f=wlit_dpo?ie=UTF8&coliid=I2TP2KR5MGFSTJ&colid=2OIMEI23BWJ9Z
What do you guys thing about that? Is that one of the effective solutions?
Well i am looking forward for your replies!!
Just to let you know i wouldn't consider the glue/tape solution as one of my final choices as in my opinion that is not so good to look at and on the other hand who would like to spend his/hers money to buy something good and then you pour glue on it!! Anyway, to finish, buying a 2nd generation Ipod Shuffle is still one of my solutions to that problem, what do you thing is best for me?
RegardsHey there, first of all let me thank you for your help and advice!!
furthermore, as i am intending to use my devise in my car as well by using an fm transmitter
(something like that one: http://www.griffintechnology.com/products/itrip-auto-universal-plus)ALWAYS BEARING IN MIND APPLE'S TWO HUGE MISTAKES:
1)the controls are on the earphones so i would also need to have one of this http://www.amazon.co.uk/Scosche-tapSTICK-IRMC-Controls-Shuffle/dp/B002CVTU5Q/ref =wlit_dpo?ie=UTF8&coliid=I10ZELYHA99O08&colid=2OIMEI23BWJ9Z (WHAT A MISTAKE!!)
AND 2)the purchase of one of these tapSTICKs in addition to a new pair of earphones is needed due to that moisture - sweat problem right?
So what do you guys suggest to me as the best solution to use my ipod in the gym (with all that moisture and sweat!) as well as using it in the car while having the option to change song?
Thank you in advance! -
What is the best solution to create the business partners in CRM?
Hi all,
I need to migrate the business partners (general data, address, marketing attributes ) in CRM from an excel file
What is the best solution to create the business partners with these informations?
I tried LSMW but to enter the SALES and MARKETING atributes in BP i have to "click" on the attribute and not realized by the record.
Thanks in advance
best regard
miguelHi Miguel,
Always preferred to use XIF Function Modules to create Business Partners and Relationships.
CRMXIF_PARTNER_SAVE
CRMXIF_PARTNER_REL_SAVE
Using this function modules you can populate all most all fields in BP including Z fields(If it created through EEWB), except Marketing Attributes.
For marketing attributes try to use FM CRM_MKTBP_CREATE_LIST_BPS_OB.
Have a look at the notes 609236, 1081545 and 1239018. This will give you some idea, how to upload and update marketing attributes.
//PBP
Maybe you are looking for
-
Sample source code for fields mapping in expert routine
Hi All Iam writing the expert routine from dso to cube for example I have two fields in dso FLD1,FLD2 same fields in infocube also ,can any body provide me sample abap code to map source fields to target fields in expert routine,your help will be hei
-
Hi I have something called a 'kernel' 'colonel' error messag eon start up. Took into Apple store and it started up no problem. No error - they ran diagnostics, nothing wrong - advised re-installing software. Happy !! Get home get erro on start-up - g
-
hi Guru's how can i upload openong balance of the the employees advance, PF, AND ESI into Professional tax etc. with regards Arun
-
Can't drag/open or shift scroll
Hi All, I started at a new job on an unfamiliar computer. I was using 10.3.9, now I'm on 10.4.3. Why can't I drag a file in the finder and hold it over a folder to open it like I used too? As well, I can't seem to shift scroll with the mouse (Logitec
-
Elements 8 when in file location view the thumbnail is not the right photo
When I click on a file folder location the thumbnail that opens in not the right photos for that file folder. I have run catalog repair and optomized the catalog. I don't know much about the database but think it must be messedup. I need to move m