Disaster after i added an index !! pls help
Hi All ,
I almost caused a diaster after i added an index to an existing table which i DO NOT understand. Kindly help me understand so i will not repeat the same mistake and i might probably get sacked if it ever happened again
existing table indexes
pk1 --> lotid(varchar2) , step_begin_time(date)
idx1 --> lotid(varchar2) , step_begin_time(date) , release_time(date) , location
idx2 --> release_time(date) , step_begin_time(date) , completion_class location
idx2a --> step_begin_time (date)
idx2b --> release_time (date)
new indexes
i added idx3 --> LOTID (only)
from what i checked in PL/SQL session it seem to take very long when it uses the step_begin_time ?
how does my action caused the loading that uses the step_begin_time to be that slow ???
if the statement uses step_begin_time , wouldn't it uses pk1 , or idx1 or idx2 or idx2a ??
if so how will the new index idx3 will result in such slowness
and if both lotid & step_begin_time are being used it would have used pk1 or idx1 ??
really need your advise
thankfully i managed to drop that new index and all looks ok (for now at least)
tks & rdgs
The index on LOTID is not necessary. Oracle (even 8.1) will happily use the indexed LOTID from the PK or idx1 if it wasn't for your wrong usage of the date data type.
As Kamal has already pointed out, when you transform the date column into a varchar column, you effectively prevent the usage of idx1 (unless you create a function based index, but that's another story and absolutely not necessary here)
You should rather convert your input parameter :b2 into a date:
WHERE lotid=:b1
AND step_begin_time = to_date(:b2,'DD-MON-YYYY hh24:mi:ss')and then Oracle should use your PK index.
You would have seen this when running explain plan. The details can be found in the manual:
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_911a.htm#2061798
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96533/ex_plan.htm#PFGRF009
Actually I'd say that idx1 is not needed at all, because the PK will prevent more than one row with the same combination of lotid, step_begin_time so the additionally indexed column in idx1 does not give you any benefits (if that index is used, that a hit will always return a single row, no need to limit that result further by looking at the additional columns.
Did you ever check whether that index (idx1) was used?
Similar Messages
-
Iphone not syncing after updating itunes 10.5. pls help
Hi apologies but I am new to all this stuff. I updated itunes to version 10.5 and I think my iphone 4 was synced in during this. After itunes had updated I found that my iphone wasnt synced in any longer. I pulled out connecter and re connected but still nothing. Rang apple tech support (on hold for an hour in cue). They tried couple of things and then advised to uninstall itunes then reinstall. I have done that but still not recognising iphone. I can sync to my other apple computer but if I try and upgrade to iOS5 on that it says I need to go to the normal computer it is synced with or I'll lose some apps etc. I dont think my iphone has the latest iOS 5 on it yet. Can anyone pls help? Apple support now closed :-( thanks
I am also in the same boat.
Windows 7 on Alienware laptop - no problems at all until upgrade of iTunes client to 10.5.
After the upgrade, attempts to sync my iPhone 4 hang at "Step 1 of 4: Backing up Rob's iPhone" (for over 12 hours)
I have read hundreds of documents with various solutions.
1) Delete backup file from C:\Users\<name>\AppData\Roaming\Apple Computer\MobileSync\Backup
2) Stop stuck MDCrashReport and AppleMobileBackup processes
3) Reinstall iTunes
It all FAILS. I work in IT and can assure you that nothing changed but whatever was changed by the iTunes application as it was upgraded to 10.5. This 2 day extravaganza is ridiculously frustrating and creating a rabid anti-apple sentiment in my house. Why the F would you (Apple) release something that is mandatory for me to use with my iPhone and have it be this buggy P.O.S.? (Rhetorical - no need to answer, please just fix this problem so I can sync and backup my phone).
Non-plussed -
Could not connect to server after OS got blue screen, Pls help.
Hi Expert,
i want to ask about this error.
when i'm trying to log in in BO Universe designer.
I'm getting this error.
[repo_proxy 13] SessionFacade::openSessionLogon with user info has failed(Unable to log on: Could not connect to server ekawati-f4e1e59:6400. Please check that the server name is correct, and that the server is running.
(hr=#0x80042a01)
service database and BO is already running.
it's happening after my os got blue screen.
does blue screen affect that much to BO?
how to solve it?
Please advise.
Thanks.
Regards,
Y Permana.Thanks for your replied.
I checked in manage servers, the [BO server].connectionserver is stopped.
After i checked in services, the database(MySql) service can't turned on if the CMS service is already running.
is that ever happen in your experience?does it happen to other database?
Could you tell me, what priority to turned services whether database, CMS or BO server?
Thanks.
Regards,
Y Permana. -
Aspire R7 572G touch screen stopped working after a windows 10 upgrade, pls help
I did a windows 10 update, but to my dismay I lost my touchscreen functions. I checked the properties on MY COMPUTER and it now says, pen and touch input not supported. Help pls
Hmmm.. I upgraded my R7 572G but my touch screen is ok. I'm not sure what you did. However, my problem was the screen does not auto-rotate in Windows 10. So I went to this folder to run as administrator to fix the auto rotate problem and it works. C:\OEM\Preload\FIXAUTOROTATE\EnableRotate.cmd
-
Pls Help. Sounds and ringtones wont open after software update
Hi Im using BB Bold 9700 and after I did the update to 5.0.0.862 I was unable to open the sounds and ringtones to change my SMS tonw, pls help I already rebooted my device and still unable to open that menu..
Hello Crimson_Night and welcome to the BlackBerry Support Community Forums.
If you go into the Media player, are you able to hear the tones?
Try clearing out the Sounds/Profiles database as shown in KB10167 and reconfigure them.
Let me know how you make out.
Thanks! And have a great day
-HMthePirate
Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)! -
pls help me how to reboot my macbook air,.. because starting it up was not successful. the screen just turns blue after the apple logo appeared.
i know loads of people who have had this problem including me. The Java script update apparently had some virus that has overloaded the start up disk. I took to apple who said i have to have the machine rebuilt but first i have to go to a data recovery company to get back everything that was on it. Data recovery company have quoted me nearly £1000.
-
Hi. I would really appreciate if someone could help me find a way to solve my problem. I bought a second hand iphone4 from my friend's friend. I fully trust my friend coz she said this iphone is working but it was handed to her lowbat so i get home i recharge it immediately and after charging it, i open and it shows to select language and country and i did select. After this it shows on the screen "Connect to itunes". Then i plug it in to my laptop and connect to itunes. It shows in my itunes " There is a problem with your iphone". Please visit the Service Answer Center to find answers to all your questions etc. To find your nearest Apple Store pls click here. I know i was so stupid to fully trust and paid before i check the phone. Can anybody pls help me with my problem.
It's probably broken. Is there an error number displayed by iTunes?
-
can someone pls help me with java on my macbook pro because after i download the mountain lion java has died and i need java to see streaming quotes from stock market
Java is no longer included in Mac OS X by default. If you want Java, you will have to install it.
However, note that you should think twice before installing Java for such a trivial need as looking at stock market quotes. There are other ways to get that information that don't involve Java, and using Java in your web browser is a HUGE security risk right now. Java has been vulnerable to attack almost constantly for the last year, and has become a very popular, frequently used method for getting malware installed via "drive-by downloads." You really, truly don't want to be using it. See:
Java is vulnerable… Again?!
http://java-0day.com -
please help...we updated ipod2 4.1 to IOS 5.1 at itunes...after it was finished only the contacts were restored...not the music & videos...iwe found the backed up data in the pc(windows 7)after entering %appdata%..pls help on how to restore...we will appreciate it very much....thanks! God bless!
The iPod backup that iTunes makes does not include synced media like app, music and videos. Thus, you wll have to resync those back to your iPod.
If necessary you can redownload iTunes purchases by:
Downloading past purchases from the App Store, iBookstore, and iTunes Store -
i tried to upgrade to ios 7 but it shows error 4005...it took more then 45 mins to download but after it just shows an image on my iphone that connect ur phone with i tunes i tried it but there's nothing happening and now i cant even use my iphone....pls help me what to do????
I have tried the steps to fix it but no solution! Please someone tell me what to do!
-
hi pls help me my iphone is forest i update but after my iphone is devices open is not working i click but sim card installed , attempting to activate this one coming pls help me answer me
Sounds like your phone was hacked to use with your carrier. Updating it has relocked the phone to it's original carrier. You will not get the phone working again without a SIM from the original carrier.
-
my safari browser is not loading any thing after an update 5.1!! i had to create guest account to brows!! pls help ASAP!!
my safari browser is not loading any thing after an update 5.1!! i had to create guest account to brows!! pls help ASAP!!
-
I AM FACING PROBLEM AFTER UPDATING (7.0.4) MY PHONE MODEL 5C,AFTER THIS UPDATE SOME TIMES I CANT MAKE CALLS & SOME TIMES WHEN ANY BODY ELSE WANTS TO CALL ME BACK THE MESSAGE COME THAT THE USER IS NOT REACHABLE.PLS HELP
I am facing the same issue! I bought 5c few days back
and everything was fine till I updated the software 7.0.4!
Whenever am connected to wifi am unable to make a call and if someone tries
Calling me they get the message that my number is not
Reachable! When I go back to 3G the calls work perfectly!!
Please help me out since I use wifi more than my network.
Appreciate any advise on this -
After I hv upgraded os 6 on my iPhone 4, iPhone hung up at least one per day. After u press "End" 2 times at fast speed ( i used to do this in the old os without problem) or when u slide to unlock - the screen suddenly enlarge . I need to reset the phone whenever this happen. Pls help
I Have fumbled all day to this resolved, I'll run the battery down and see what happens afterwards. This is not good !
-
I have a problem with my MacBook Pro, I pressed the power button and after that the apple noise came and the screen turned blue. What can I do and what happened? pls help & thx btw
You may find this helpful:
http://support.apple.com/kb/PH14061
Ciao.
Maybe you are looking for
-
Problems with disk image in Time Capsule
I've created a disk image on my timecapsule to use as extra storage. Since the disk image won't automatically mount on my desktop, I have created an alias to a folder saved inside that disk image. When I open the alias, this mounts the disk image and
-
Tool bars missing advisor says 'hold key down - What KEY???
My tool bars went missing, so I went to help. The advise said this is a 'new' feature [who needs this???] It also said I could restore the tool bars that I didn't ask to lose by holding 'the key' down and pressing V T etc at the same time. But, My ke
-
Is my iphone 5 "paper weight"?
Owing old bill, want to unlock...(not my bill). It's not on that new plan that was issued in 2013 where you can unlock after 90 days etc... phone is on an older plan. Question is, is this $300+ phone just paper weight? What can I do with this? I'm w
-
went wrong. I was asked for a password, entered my logon password and then could not send or receive email msgs.
-
Create smart playlist - "shuffle randomly" - burn DVD
The above is all what I want to do. I can create a smart playlist no problem. I can burn a DVD with the playlist no problem. BUT I can not get the playlist to randomly shuffled in the itunes window before I burn the disk?!! Shuffle is on "By Song" an