Is there a way to optimize this request ?
Hi,
The above function returns the YEARS of the lines of a table. Each line contains a date. Data Sample :
3487 22/06/2003 17:19:53 2,288
3487 22/06/2003 17:20:54 8,277
3467 22/06/2003 17:21:32 40,1378
3487 22/06/2003 17:23:32 2,386
3467 22/06/2003 17:23:57 38,9814
The table contains 4 060 521 lines....
DECLARE
X VARCHAR2 (4000);
BEGIN
X := 'SELECT distinct(TO_CHAR(DATE1, ''YYYY'')) d, (TO_CHAR(DATE1, ''YYYY'')) r
FROM EVV_'||:p4_site ||' order by d';
RETURN X ;
END;Is there a way to reduce the time taken by the request ? kind of optimization ?
Thank you for you kind help.
Christian.
>
Salut,
First things first DB version/OS/Hardware - Disk/CPU.
The above function returns the YEARS of the lines of a table. Each line contains a date. Data Sample :
3487 22/06/2003 17:19:53 2,288
3487 22/06/2003 17:20:54 8,277
3467 22/06/2003 17:21:32 40,1378
3487 22/06/2003 17:23:32 2,386
3467 22/06/2003 17:23:57 38,9814
The table contains 4 060 521 lines....
DECLARE
X VARCHAR2 (4000);
BEGIN
X := 'SELECT distinct(TO_CHAR(DATE1, ''YYYY'')) d, (TO_CHAR(DATE1, ''YYYY'')) r
FROM EVV_'||:p4_site ||' order by d';
RETURN X ;
END;
Is there a way to reduce the time taken by the request ? kind of optimization ?Furthermore, we don't know the time taken, you haven't told us!
Put in a query plan for this if you want more information.
Use a functional index? Put an index on the TO_CHAR of the year for that
field of that table? BTW, this is just a guess.
Thank you for you kind help.De rien.
Paul...
Christian.--
When asking database related questions, please give other posters
some clues, like OS (with version), version of Oracle being used and DDL.
Other trivia such as CPU, RAM + Disk configuration might also be useful.
The exact text and/or number of error messages is useful (!= "it didn't work!"). Thanks.
Furthermore, as a courtesy to those who spend time analysing and attempting to help,
please do not top post and do try to trim your replies!
Similar Messages
-
Everyday when I open Firefox a msg comes on the screen that says "It is strongly recommended that you apply this update for Firefox ASAP. When I try to install, it will not connect to the connecting server so it just clocks forever.
See:
* http://kb.mozillazine.org/Software_Update (Software Update not working properly)
Remove the files in the updates and updates\0 folder.
You may need to delete active-update.xml and updates.xml as well if present.
XP:
C:\Documents and Settings\<user>\Local Settings\Application Data\Mozilla\Firefox\Mozilla Firefox\updates
(%USERPROFILE%\Local Settings\Application Data\Mozilla\Firefox\Mozilla Firefox)
If you have problems with updating then easiest is to download the full version and uninstall the currently installed version.
You may need to remove the Firefox program folder to do a clean install of the new version.
Do a clean (re-)install:
* Download a fresh Firefox copy and save the file to the desktop.
* Firefox 4.0.x: http://www.mozilla.com/en-US/firefox/all.html
* Uninstall your current Firefox version and remove the Firefox program folder before installing that copy of the Firefox installer.
* Do not remove personal data if you uninstall the current version.
* It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
Your bookmarks and other profile data are stored elsewhere in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder] and won't be affected by a reinstall, but make sure that you do not select to remove personal data if you uninstall Firefox. -
I lost my password and cannot log on to my MacBook Pro. MacOS X window opens upon startup, with my log on name, requesting password, but I cannot remember it. Is there a way to bypass this window and reset my password? Cannot get to System Preferences or Apple Menu
Thanks!Yes.
https://discussions.apple.com/thread/4913069 -
My iMovie project staggers/skips over my transitions...I read that I need to optimize each clip. I did this individually and it worked but was time consuming. Is there a way to optimize all of my clips at once upon import?
When you import, the import screen should give you the option to optimize clips. Select Optimize - Full Size.
I think you can also right-click on the Event Name and it will let you optimize all clips in the Event, but I haven't tried it lately. -
I use a bluetooth headset with iPhone 5 but when I ask Siri to read my email she says I must unlock my phone first. If I take the phone out of my pocket I might as well just read the email from the phone screen. Is there a way to fix this so the phone doesn't have to be unlocked?
Apple, as I'm sure you know, now manage official phone 'unlocks' directly rather than the Newtork doing so.
When a GSM Network Provider buys a consignment of iPhone's they are locked to that carrier and may only be officially unlocked if said carrier requests it. If so, it is Apple who do this, via iTunes.
I am therefore inclined to think that part of the any generic iTunes syncing process involves the transmission of key hardware data, including IMEI, to Apple whenever the handset is synced.
If this is the case and, as each iTunes account is linked to a credit card, were Apple to maintain a database of genuinely stolen phones (ones reported to Police) they could advise said Police force when a stolen phone stuck its metaphorical head over the parapets once again? They would be able to identify the name & address of the new user.
I have spoken to the Police here in Ireland today and they regularly engage with Apple on such matters.
This may not be tracking as we know it Jim, (not using GSM Triangulation or GPS) but it's arguably even more targetted and leaves an indelible fingerprint of guilt on the thief.
The laws here are simple in this regard, if you are in possession of stolen property, knowlingly or otherwise, you forfeit the goods once the Police show up. Whether you get prosecuted depends on whether you stole the goods or were duped into purchasing them. -
I am trying to watch Prof. Susskind's lectures from Stanford Univ. U-tube lectures work fine.With I-tunes, there is a synchronization problem between audio and video. Is there a way to fix this or the people who uploaded messed up and it is too late?
I had thought this situation was solved but it just got worse. In addition to being without service for several days I am now being charged a cancellation fee for a broadband service that BT disconnected in error. BT Vision was also terminated by BT but the set up charges are still in place. Does anyone know who the relevant Ombudsman is? I called BT from America on Friday - for an hour - while someone called Aruj sorted out why there is an order 'in progress' that I didn't initiate; why I have fees relating to a problem created by BT and why there are references to a house move that didn't take place and a BT Vision service I no longer have but didn't cancel myself. He assured me it would be rectified and my bill would be reduced by 139 pounds and we would get confirmation of this later that day. I asked him what chance there was that this would not actually happen - he said no chance at all; my new bill would be 23.50.
There was no text message. An online chat person today told me there had been a fee reduction request which had been declined and there was nothing else he could help me with as he dealt only with broadband. But he would get BT Vision to email me. They always seem so helpful.............
I'm sure I'm listed somewhere as 'a problem', there's no other explanation for why I get the runaround -
Can I put more than one user under one Apple ID account. I want to let other family members use imessage on their own Apple device. Or is there another way to get this end result?
You can seach the net for solutions like this one http://appletvvpn.com/how-to-connect-apple-tv-2-to-vpn/ another idea is to use a PC as the control and fit that with a wireless card and set up a ad hoc wireless network that the Apple TV uses.
-
After I watch a podcast I delete it. When I go back in there are 500-600 episodes and I have to delete each one manually. Is there a way to stop this from happening or is there a way to delete all at once. It's getting very frustrating.
Had all these issues. Bit the bullet and downloaded the Downcast App ($1.99). Much better expereince and a lot more features. Sad.
-
When I attempt to open a PDF file I saved from a website using Safari, I get the message "There was an error opening this document. The file is damaged and could not be repaired." When I save the same PDF file using FireFox it opens up immediately. Is there any way to correct this problem with Safari?
Back up all data.
Triple-click the line of text below to select it, the copy the selected text to the Clipboard (command-C):
/Library/Internet Plug-ins
In the Finder, select
Go ▹ Go to Folder
from the menu bar, or press the key combination shift-command-G. Paste into the text box that opens (command-V), then press return.
From the folder that opens, remove any items that have the letters “PDF” in the name. You may be prompted for your login password. Then quit and relaunch Safari, and test.
The "Silverlight" web plugin distributed by Microsoft can also interfere with PDF display in Safari, so you may need to remove it as well, if it's present.
If you still have the issue, repeat with this line:
~/Library/Internet Plug-ins
If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again. -
When I try to print a drawing imported from my ipad iphoto crops it. Is there any way to stop this?
Usual cause: printing at the wrong aspect ratio for the image - trying to print 5 x 3 in the shape of a 6 x 4 for instance.
Regards
TD -
When I save photos or videos from my iPhone 4S to my PC they are all sideways. Is there a way to prevent this from happening? All are taken with the phone in portrait mode.
Shot videos ONLY in landscape. For photos choose what's you like. Maybe you have to rotate photos on PC. What's your operating system?
-
I'm trying to add a playlist manually to my iPhone 4. It won't let me because it's trying to delete all of the music currently on my iPhone. Is there any way to prevent this from happening in order to start manually updating it?
Are you leaving the box unchecked to Manually manage music & videos? You don't need to to add anything to the iPhone.
Simply drag the playlist to the iPhone to manually add it. -
When I listen to music on my iPhone and pause it, if I come back to it later, the playlist has started over. I have a 4S running on iOS 7.0.4. Is there any way to keep this from happening so that my playlist will start off where I last was?
Dear Jody..jone5
Good for you that can't update your iphone because I did it and my iphone dosen't work for example I can't download any app like Wecaht or Twitter..
Goodluck
Atousa -
I bought my iphone 5s a week before and now its volume "up" button is not working when pressed.Does anybody know what to do to make it work?I have a one year warranty.Should i give it to apple retail shop or is there any way to solve this problem?
IF it is a manufacturing defect and you bought the device from Apple or an authorized Apple retailer, then take it into Apple.
-
I made a dumb decision to 'Erase Free Space' on my drive. I now have no free space, I realize because it wrote 0's over all my free space. Is there a way to undo this??? Help please I can't save any documents now! Thanks in advance all, it is truly appreciated. how can find the hidden temporary files using the terminal what do i type in?
It's more likely a failed Erase Free Space, which creates a huge temporary file; that's why it looks like you have no more available drive space. You can recover from this. See these links
https://discussions.apple.com/message/10938738#10938738
http://www.macgeekery.com/tips/quickie/recovering_from_a_failed_secure_erase_fre e_space
Post back if you need any help with this.
Maybe you are looking for
-
please help, thanks.
-
Labview IMAQ VI for capturing images and saving with incremental file names
Hello, I am using LabView 7.1(IMAQ) to capture images with NI's PCI 1426 card, and a JAI CV-M2 camera. Now, with the example VI's like LL Grab, or LL Sequence, or Snap and Save to File.vi, I can capture the images. But what I actually want is to capt
-
Web service transported but not active in QA environment
Hi all, In order to support a template document i've created a web service using the web service tool. All is working fine in DEV and all has been successfully transported to QA environment (I think). The web service objects have been included in the
-
What file format can be used to play 3D videos on Panasonic TVPlasma3D with USB PenDrive?
What file format can be used to play 3D videos on Panasonic TVPlasma3D with USB PenDrive? I writed to Panasonic Italy support about this question: "What file format can be used to play 3D videos on Panasonic TVPlasma3D with USB PenDrive?" Panasonic w
-
hi all, i made the salary slip in which i m showing the Toatal days paid by using wage type \807, in my company we will deduct the salary for leave type LWP(leave without pay) but problem is that when employee takes full day LWP then it deducts from