GTT helps performance - one day to be several minute
I have a a case like this:
for rec (select *
from gl.interface
where accounting_date between...
order by c1, c2)
loop
-- concate some columns of rec
-- do update gl_interface
end loop;it takes about a day to generate notepad report from this query (the records is about 6.000.000).
And after along day, i resolve it and it takes only several minutes to generate the report.
What i am doing is these steps:
1. create global temporary table that delete records after commit. And create some indeks, like rn that is row_number() over (order by c1, c2)
2. ITAS the gtt with select * , row_number() over (order by c1, c2)
from gl.interface
where accounting_date between
3. change the cursor query above in my oracle form:
for rec in(
select *
from gtt
where accounting_date between...
order by rn
loop
end loop;
update gl_interface
set...
where exists(
select ..
from gtt...
where col1 =...
)I still wonder how it works? and what is the drawbacks of using this gtt? tx.
Edited by: infotools on Jan 7, 2013 3:35 AM
Edited by: infotools on Jan 7, 2013 3:35 AM
Edited by: infotools on Jan 7, 2013 3:36 AM
infotools wrote:
No, i don't want to use bulk for i don't want to create arrays. And for my case, i am satisfied with the results. But, i still wonder how it decrease the time so much using gtt...and can be ITAS...and may be the
select a||b||c
from
instead of
for ()
loop
s = cc.a || cc.b||cc.c....
end loop;
is it because i put much of the pl-sql statements in my select-sql?Likely because you have reduced context switching between the SQL and PL/SQL engines. By selecting rows in a loop and updating or inserting for each row selected, you are constantly switching back and forth between PL/SQL and SQL, and that is known to be poor for performance. Using a GTT will help improve things because you are reducing the amount of context switches, but then if the data is already coming from database tables, you shouldn't need to use a GTT in the first place... as just doing it directly from the database tables, using something like MERGE will do it all in the SQL engine anyway.
Similar Messages
-
Got the new Iphone 5c from Verizon today and was really happy with the phone until we realized it is unable to send or recieve text messages AT ALL. We've tried everything, searched the internet for hours, I've tried live chatting with Verizon and Apple ALL DAY and somehow keep getting "disconnected" even though my internet is working perfectly. The phone is pretty much useless if it's unable to perform one of it's main functions and it's really dissapointing to add a line, get the phone, only to discover a major problem with seemingly no solution whatsoever. Is there any fix for this? Because a phone that is incapable of sending or receiving a simple SMS message is pretty much useless. It's too bad too because I really love the phone if not for that. Does anyone have a legitimate way to solve this problem? We've done everything, network resets, turning imessaging on and off, factory reset, etc. etc. etc. and nothing works. Please help.
Hello Idkallday!
I know your device sends and receives text messages! Let's get to work on this! Did you port your service from another carrier, or is this a new number? Is your previous device still powered on?
I also want to ask if you are able to use iMessaging, and if you see any error message when sending?
Please test it by sending a message to your own mobile number, and keep us posted!
ChristinaB_VZW
Follow us on Twitter @VZWSupport -
Weather day is one day slow and even though it is pass midnight it still shows the yesterday's weather. Could any one help? Thanks. I phone 4
Pay no attention to iinami, the amount of replies to people saying their handsets must have been jailbroken everytime iTunes throws out an error is tremendous. (Clearly you don't need to have any real knowledge to get to level 3 on these forums, let's hope apple's geniuses know a lot more than some of their customers.)
http://support.apple.com/kb/TS3694
Solution below.
Error 9
This error occurs when the device unexpectedly loses its USB connection with iTunes. This can occur if the device is manually disconnected during the restore process. This issue can be resolved by performing USB troubleshooting, using a different USB dock-connector cable, trying another USB port, restoring on another computer, or by eliminating conflicts from third-party security software. -
-reformatted computer, reinstalled everything
-downloaded the newest version of mozilla
-happily went online for one day
-next day, browser does not load
-later the next day, browser doesn't even open up
-now when i go to open mozilla, something like this shows up:
"server busy, taking too long...if your firewall is on make sure mozilla is allowed to browse...adjust proxy settings blah blah...HI Juanverano,
Not a problem, Safe Mode will disable addons and hardware acceleration. If this continues and it is not an add on this will be the next step to try to disable acceleration:
Try disabling graphics hardware acceleration. Since this feature was added to Firefox, it has gradually improved, but there still are a few glitches.
You might need to restart Firefox in order for this to take effect, so save all work first (e.g., mail you are composing, online documents you're editing, etc.).
Then perform these steps:
#Open Firefox ''Options'' window (''Preferences'' on Mac or Linux) as follows:
#* In Firefox 29.0 and above, click the menu button [[Image:New Fx Menu]] and select ''Options'' for Windows or ''Preferences'' on Mac or Linux.
#* In Firefox 28.0 and previous versions, click the orange Firefox button at the top left, then select the "Options" button, or, if there is no Firefox button at the top, go to Tools > Options.
#In the Firefox Options (or Preferences) window, click the ''Advanced'' tab, then select ''General''.
#In the settings list, you should find the ''Use hardware acceleration when available'' checkbox. Uncheck this checkbox.
#Now, restart Firefox and see if the problems persist.
Additionally, please check for updates for your graphics driver by following the steps mentioned in the following Knowledge base articles:
* [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]]
* [[Upgrade your graphics drivers to use hardware acceleration and WebGL]]
Did this fix your problems? Please report back to us!
Thank you. -
My ipod 4 when i plug it to my pc Windows 7 had worked fine for 8 months then one day i plug it in and a message came USB device not recognized, i tried reset network settings and nothing i did not install any software before this happend i called apple they did not know, any help out there TX
Start here:
iPhone, iPad, or iPod touch: Device not recognized in iTunes for Windows -
As the title question states, I lost a really important file with iText Express. I've been using iText Express for a year or two now because it's just the one application I downloaded for writing and saving documents. I was working on one for a few months and randomly one day last month, when I went to open it to resume editing my work, the file was gone! I searched my whole laptop and trash. Then one day, a "Recovered Files" folder popped up in the area my file used to be, so I assumed that was the file I lost being recovered and I felt relieved. But when I opened the folder, the document inside was a "SoftwareMap" document with a bunch of coding written in it. I don't understand what I'm supposed to do with that or how it's going to help me recover my file?!? I lost SO much work!!! If anyone has ANY idea what to do, how this happened, or if the coding is supposed to help me recover my file, PLEASE help!!!
No, I already tried looking at that. The file that recovered was not in the trash, it appeared in my documents folder. I opened it up and inside was an iText Express document with coding. Then inside of there, was and then and this "SoftwareMap" document contained a bunch of coding and symbols and words.
-
Hi, I was working in WORD on a file containing huge data. My machine just hung up one day while working and now I seem to have lost the file how do I get it back. Please HELP me.
Well, iCloud has nothing to do with this.
Do you have the built-in backup function Time Machine running on your Mac?
See: http://support.apple.com/kb/ht1427 -
Hi
I have a Iphone4 in using. I couldn't find Safary, E-mail and notes from my phone one day. I made this mistake when I want to delete some programe from my phone. Who can help I recovery my phone please.
ThanksHello, HenryWang2103.
Thank you for visiting Apple Support Communities.
The Safari, Email and Notes applications are native to the iOS and is unable to be deleted. Since this is the case, they are either in a folder on the iPhone, on another page or Restrictions are enabled. You can also search for these Apps on the iPhone by touching the screen and sliding your finger down. Here is some information regarding these features. The information about folders is located in the user guide below.
iPhone User Guide
iOS: Understanding Restrictions (Parental Controls)
http://support.apple.com/kb/HT4213
Cheers,
Jason H. -
Having serious problems with calendar duplications, one birthday now showing 174 times on one day! Help!
Having serious problems with calendar duplications, one birthday now showing 174 times on one day! Help!
-
My one day old nano 6 has stopped working and will not restart can you help?
my one day old nano 6 has stopped working and will not restart can you help?
try this........ http://www.apple.com/support/ipodnano/assistant/itunes/
-
After iOS 5 update my iCal shows all my Birthdays one day earlier. Please help. thx
Same issue here. In searching through Apple Discussions site I see this has been happening for at least 5 years now were b-days can pop up 1 or even 2 days early. Really Apple? I am disappoint.
-
On my 90 day old MacBook Pro I can't send or receive (Mobile Me) email via "Mail." The fetch icon keeps spinning. Any help would be greatly appreciated. I'm able to receive Mobile Me emails on my iphone or via the web, but just not on the laptop. I'm only one day past the free Apple care:(
Thanks!glippert wrote:
Tkx, tjk...I tried calling Apple Care and they directed me to the forums...
I guess that's their right at one second past midnight on the 91st day.
Here's the link to the MobileMe support forums; I'd post there:
https://discussions.apple.com/community/mobileme -
My screen won't work, i have tried turning it off but i cant swipe the power down button because my screen doesnt work. I have only had my iphone 4s for one day and this has happened, someone please help me.
Did the trick! Not sure what I did to cause the screen to go numb, but this worked perfectly!!! I cleaned the screen and must have inadvertently selected something that locked the screen. This perfect solution kept me from having to run to the Apple Store. Many thanks.
-
Ok one day out of the blue my ipod just stopped working it wouldnt turn on nothing but after recovering it, it's fine now but there is only one problem my screen wont work i can't do anything on it not even unlock it please someone help!!!!
Try the following:
- A reset. Nothing is lost
Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
least ten seconds, until the Apple logo appears.
- Restore from backup
- Restore to factory settings/new iPod.
If you still have the problem that indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order -
I have been using an app cheat with friends with my iPad for a long time. One day it just stopped reading the screen shot. I have tried deleting a few times and starting over. It works on my iPhone perfectly fine. Please help !!!!!!! Thank you
@Colin Robinson
Thanks, I did it hundreds of time!!!
Anyway here's what I did:
I'd wrote an email to Apple America, even if I'd purchased the item in Europe and the US support usually should not be involved in any European case.
They wrote me back that a European office will have call me in 48 hours.
After a couple of days I've received a call and a new iPod is coming from US...
Don't ask me if I can find any kind of logic behind it, but at least I can state that the US support has been decisive.
Thanks to everybody.
Maybe you are looking for
-
Closing Reports Background Engine from VB
I have a Visual Basic 6 application that runs Reports 6 reports with the ActiveX control Rwsxa60.ocx. When you close the application, the Reports background engine is still open. Is there a way to close the engine through VB? Thanks in advance for an
-
Open OA Page in new Tab or new Window
Hi I there a way that you can set a page to open up in a new tab or window instead of replacing the current page you are in? thank you
-
Does anyone know if Sun has any plans to release a patch for the current RI?
-
Can't get itunes to play on my computer
I have Window 8.1 and just did an update in itunes but when I went to play my songs they won't play.
-
AirPort fully Connected but Safari not loading
My airport shows i'm picking up full bars from my wireless router. But when i run safari it shows that i'm not connected to the server. I have a magicjack connected to my macbook and thats running fine.. fyi internet is needed to run this. Also on my