Time consuming SQL

Forte Users,
I have a window with many filinfield's, and I want to update them
as soon I open that window. But there are too much data, and it takes too
long. Is there any way to decrease that wait?
I tried do make a LIKE statement within my SQL, but it doesnt seem
to accept a variable ( textdata or string ) like <:name> as the LIKE
compare parameter.
Any help?...
Thanks,
Celso M. Motta
PS: I read the manual, but it didnt help me anyway..

Hi,
might be the script from Steve Adams site gives you some ideas
-- Script:     expensive_sql.sql
-- Purpose:     to find expensive sql that may need tuning
-- Copyright:     (c) 2000 Ixora Pty Ltd
-- Author:     Steve Adams
@save_sqlplus_settings
prompt This script shows SQL statement that account for more than
prompt a certain percentage of disk reads.
prompt
@accept Percent "Threshold percentage of disk reads" 2.5
column executes format 9999999
break on load on executes
select
substr(
to_char(
100 * s.disk_reads / t.total_disk_reads,
'99.00'
2
) ||
'%' load,
s.executions executes,
p.sql_text
from
( select sum(disk_reads) total_disk_reads from sys.v_$sql ) t,
sys.v_$sql s,
sys.v_$sqltext p
where
(100 * s.disk_reads / t.total_disk_reads > &Percent)
and s.disk_reads > 50 * s.executions and
p.address = s.address
order by
1, s.address, p.piece
undefine Percent
@restore_sqlplus_settings
Hope this helps,
Andrey

Similar Messages

  • Time Consuming SQL Statements

    Hi All
    I am working on Performance Tuning on Oracle 10g/ Solaris environment.
    I am looking for a shell script that gives top 10 Time Consuming SQL Statements...... My client does not want me to use statspack or OEM for somereasons which i dont know.
    I am wondering if any of you might help me out ....
    Please post your script here ...........
    thanks in advance
    riah

    Hi,
    might be the script from Steve Adams site gives you some ideas
    -- Script:     expensive_sql.sql
    -- Purpose:     to find expensive sql that may need tuning
    -- Copyright:     (c) 2000 Ixora Pty Ltd
    -- Author:     Steve Adams
    @save_sqlplus_settings
    prompt This script shows SQL statement that account for more than
    prompt a certain percentage of disk reads.
    prompt
    @accept Percent "Threshold percentage of disk reads" 2.5
    column executes format 9999999
    break on load on executes
    select
    substr(
    to_char(
    100 * s.disk_reads / t.total_disk_reads,
    '99.00'
    2
    ) ||
    '%' load,
    s.executions executes,
    p.sql_text
    from
    ( select sum(disk_reads) total_disk_reads from sys.v_$sql ) t,
    sys.v_$sql s,
    sys.v_$sqltext p
    where
    (100 * s.disk_reads / t.total_disk_reads > &Percent)
    and s.disk_reads > 50 * s.executions and
    p.address = s.address
    order by
    1, s.address, p.piece
    undefine Percent
    @restore_sqlplus_settings
    Hope this helps,
    Andrey

  • Data lost when sql is very time-consuming

    Hi,
    I use sql statement as a data source,
    When the sql statement is very time-consuming(1 hour for example),
    the exported data as pdf file  was incomplete:
    only the first page exported when it's supposed to be three pages.
    thanks for your reply.

    You need to optimize your SQL statement. Use a Stored Porcedure or something Server side rather than Client side.

  • Time consuming with big number of columns in RowSet

    Hi,
    In the SQL Query Editor, i select 3 columns to retrieve from MySQL Database and I set these 3 columns in JSC Table -> OK, GOOD performance
    Now, i select 30 columns in rowset (from the same table database), BUT i show only the 3 same columns in JSC Table -> BAD Performance
    Could you explain me why this phenomena ? When you run the SQL query, there is no this time consuming effect !
    How can optimize it?
    Thx

    Hi,
    How much does the performance suffer when you are selecting 30 columns in the rowset? Approximate times taken for executing the two different SQL statements would be more helpful. There are various factors involved which could be influencing the performance. Please give details.
    Cheers
    Girish

  • I have a solution (albiet time consuming) to iTunes match step 3 crashing

    So I've been a iTunes Match subscriber for about 6 months. At first it took me a few goes of it to get it down to about only 350 songs needing to be uploaded in Step 3.... Then the REAL frustration began.... From that point forward no matter what I tried I could NEVER get past Step 3. As soon as Step 2 finished and step 3 began, iTunes would crash. So for the past 5 months I have been unable to get those 350 songs uploaded. It wouldn't even do just one then crash. I was frustrated but after looking I could do without having access too those 350 songs at all times. But then there WAS a song that I HAD to have access too and the frustration began again. I tried EVERYTHING I could find on the internet. Uninstalling and reinstalling iTunes, turning Match off then on, deleting errored files (I only had 4). Playing with router settings, everything. I noticed a lot of people wondering about having music on external hard drives even which mine is. (I will say from experience if your using a USB hub to connect your external hard drives, try connecting them directly into your computers USB port to speed things up a bit).  Then I started reading about people having success converting one troublesome song or two to ACC, deleting the old version, then "manually" right clicking on them and clicking "add to iCloud" My issue was that this option was NEVER available to me when I right clicked the songs in iTunes! Plus some of the 350 songs were already in ACC format. Tonight, after playing around I've found a round about way (and time consuming if your doing this for 350 songs like me, feel bad to those who have THOUSANDS) to finally get these songs to upload to iTunes Match. Here is what I did, and I REALLY hope this can help someone else.
    #1. When you first open iTunes, you notice in the top/middle info window that iTunes attempts to connect to the iTunes store, AND iTunes match tries to do its thing as well. AS SOON AS YOU OPEN ITUNES, click the small little X next to the progress indicator inside that info window until ALL acivities have stopped.
    #2. Make sure you have the "iCloud Status" sort turned on
    #3. Sort your song list in iTunes by the iCloud Status Look down the list until you get to where all of your "waiting" songs are at
    #4. Select a small managable group (10 worked best for me, more than that would sometimes cause errors and I would have to redo them)
    #5. Right click on the selected group and then select "convert to ACC"
    #6 DO NOT CLICK ON ANYTHING ELSE AFTER 'convert to ACC"
    #7 Once this completes you will hear the normal "ding" that iTunes is finished
    #8. The original files will still be selected with the new ACC versions below each one, not selected. Hit your delete key.(You only want to keep the newly converted ACC files) Also, EVEN IF A FILE WAS PREVIOUSLY ACC, STILL SELECT IT FOR THIS CONVERT TO ACC PROCESS!!!!! If itunes asks if you want to delete these and move to the recycle bin, do so, as you now have another copy that seems to play well with iTunes.
    #9 Now you have the 10 recently converted to ACC songs... Select those ten, right click on them then the "Add to iCloud" option (which for me was the first time I had ever gotten to see it at all)
    #10 iTunes Match should now begin the process of trying to match JUST THOSE SELECTED songs, then upload whatever is needed. Using this system, I HAVE YET to run across iTunes or iTunes match, hanging up, or crashing all together.
    I know this is a bit time consuming, and you COULD do this just for the songs you REALLY wanted to make sure were in the Cloud if you wish. My thought was if I'm going to do it, I might as well do them all.
    I REALLY hope this will help someone as I have read so many forum posts, websites, ect, with people just as frustrated as me. And it even made it more frustrating as I had seen new "solutions" posted online yet said solutions still wouldn't work for me.  If you have any questions, please feel free to comment and I'll try to answer and help!

    So I've been a iTunes Match subscriber for about 6 months. At first it took me a few goes of it to get it down to about only 350 songs needing to be uploaded in Step 3.... Then the REAL frustration began.... From that point forward no matter what I tried I could NEVER get past Step 3. As soon as Step 2 finished and step 3 began, iTunes would crash. So for the past 5 months I have been unable to get those 350 songs uploaded. It wouldn't even do just one then crash. I was frustrated but after looking I could do without having access too those 350 songs at all times. But then there WAS a song that I HAD to have access too and the frustration began again. I tried EVERYTHING I could find on the internet. Uninstalling and reinstalling iTunes, turning Match off then on, deleting errored files (I only had 4). Playing with router settings, everything. I noticed a lot of people wondering about having music on external hard drives even which mine is. (I will say from experience if your using a USB hub to connect your external hard drives, try connecting them directly into your computers USB port to speed things up a bit).  Then I started reading about people having success converting one troublesome song or two to ACC, deleting the old version, then "manually" right clicking on them and clicking "add to iCloud" My issue was that this option was NEVER available to me when I right clicked the songs in iTunes! Plus some of the 350 songs were already in ACC format. Tonight, after playing around I've found a round about way (and time consuming if your doing this for 350 songs like me, feel bad to those who have THOUSANDS) to finally get these songs to upload to iTunes Match. Here is what I did, and I REALLY hope this can help someone else.
    #1. When you first open iTunes, you notice in the top/middle info window that iTunes attempts to connect to the iTunes store, AND iTunes match tries to do its thing as well. AS SOON AS YOU OPEN ITUNES, click the small little X next to the progress indicator inside that info window until ALL acivities have stopped.
    #2. Make sure you have the "iCloud Status" sort turned on
    #3. Sort your song list in iTunes by the iCloud Status Look down the list until you get to where all of your "waiting" songs are at
    #4. Select a small managable group (10 worked best for me, more than that would sometimes cause errors and I would have to redo them)
    #5. Right click on the selected group and then select "convert to ACC"
    #6 DO NOT CLICK ON ANYTHING ELSE AFTER 'convert to ACC"
    #7 Once this completes you will hear the normal "ding" that iTunes is finished
    #8. The original files will still be selected with the new ACC versions below each one, not selected. Hit your delete key.(You only want to keep the newly converted ACC files) Also, EVEN IF A FILE WAS PREVIOUSLY ACC, STILL SELECT IT FOR THIS CONVERT TO ACC PROCESS!!!!! If itunes asks if you want to delete these and move to the recycle bin, do so, as you now have another copy that seems to play well with iTunes.
    #9 Now you have the 10 recently converted to ACC songs... Select those ten, right click on them then the "Add to iCloud" option (which for me was the first time I had ever gotten to see it at all)
    #10 iTunes Match should now begin the process of trying to match JUST THOSE SELECTED songs, then upload whatever is needed. Using this system, I HAVE YET to run across iTunes or iTunes match, hanging up, or crashing all together.
    I know this is a bit time consuming, and you COULD do this just for the songs you REALLY wanted to make sure were in the Cloud if you wish. My thought was if I'm going to do it, I might as well do them all.
    I REALLY hope this will help someone as I have read so many forum posts, websites, ect, with people just as frustrated as me. And it even made it more frustrating as I had seen new "solutions" posted online yet said solutions still wouldn't work for me.  If you have any questions, please feel free to comment and I'll try to answer and help!

  • Since recent updates, I have noticed that my apps close automatically when I am distracted. In some cases it is time consuming to sign back in and get back to the task I was doing. Is it possible to change a setting so the apps will stay open?

    Since recent updates of iOS, I have noticed when using my iPad that my apps close automatically when I have to leave the room or am otherwise distracted for a few minutes. It is sometimes time consuming to sign back in and get back to the task where i left off. Is there a setting I can change so it will keep the apps open until I am ready to close them? Thanks for your help.

    Did you have this problem before Restoring you iPad?
    If you did then did you restore with a backup. You may have reinstalled something that is conflicting in this back up
    If not then sounds like either something went array with the clean install or a hardware issue.
    I know it's long winded but have you tired a clean install then downloading the apps again?
    PJRS

  • First time an SQL expression is placed on report a DB SELECT executes

    The same problem can be created using the normal Crystal Reports XI Release 2 developer environment and/or code (not only a code issue). I'm using CR XI.
    Symptom:
    We dynamically auto generate SQL Expressions, Tables, Joins, Formula's and anything through C# and place it onto the Crystal Report through code via run-time user input in a web environment. I recieved a notification from one of my DB admins that crystal reports is causing massive memory consumption via unknown SELECT statements that have no joins and/or WHERE criteria.
    Some Detective Work/More Info:
    After using Microsoft "SQL Profiler" along with Crystal, I understand what is happening but don't know the "work around" to make Crystal stop executing the following SELECT scenario.
    Anytime I create a new "SQL Expression" for the first time and then physically "drag and drop" it onto the report then Crystal is executing a "silent" SELECT statement against the database in the design environment. I'm calling it "silent" because I need MS SQL Profiler to see it happen. I'm guessing that this is used for validation or something but this is causing problems when automatically generating a report in a production environment.
    Steps to re-create:
    1. Open MS "SQL Profiler" and get it running. (will show Crystal Engine silently executes the SELECTS)
    2. Add a new "SQL Expression" to your report.
    3. Drag and Drop your new "SQL Expression onto your report
    4. You will see that Crystal has created an SQL query and executed it against your database in design environment.
    The Problem:
    I can see under normal circumstances why you might want this funtionality (if it's actually used for the Crystal Engine to validate your SQL Expression). But, What also makes this functionality horrible is that on my behalf Crystal is creating these SELECT statements and using cross joins which is a major problem in a production environment. As a result, huge record sets are being created on our DB Server. I don't believe that this has any purpose in a production evironment when the cross-joins can create huge amounts of results just for the sake of Crystal Internally validating a new SQL Expression placed onto a report. It would be nice to disable this functionality in production. I don't know a "work around" since these SELECT queries are created on my behalf by the Crystal Engine at design time (via code auto generation in production).
    Questions:
    Can this functionality be disabled to prevent a production server from incurring the execution of these queries?
    Anybody else notice this and have a "work around"?

    This is a cross post of:
    1st time an SQL expression is placed on report a DB SELECT executes
    Please do not cross post. See the [Rules of Engagement|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement].
    The above post has been moved to the Crystal Reports Design forum, thus locking this thread.
    Ludek

  • How to find the Names of Most costly Views or Most Time consuming views

    Hi All,
    I had a database consisting of almost 200 views,as a part of Optimization process i want to find out the most costlier views.How to do that.Actually i want the names of the VIEWS,so that i can optimize that.Can any one help me out?
    I had one more doubt in our Database a view is created like view A( which is created by joining several tables).so do i need to add index on this view separately or does it take the index of the tables which i joined? And in our Database i  had created
    a VIEW which is derived from other views(the Joining objects are views not tables),so while i select recoreds from this views which is derived from other views it is taking a lot of time.Is tehre any problem with that?

    Please avoid such double post spread over several forums:
    http://social.msdn.microsoft.com/Forums/en-US/bae4042a-10b8-4d12-aa46-88a05ea37a76/how-to-find-the-names-of-most-costly-views-or-most-time-consuming-views?forum=sqldataaccess
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • It there a way to disable the time consuming animation, when leafing through iCal for Lion?

    When klicking forward or backward the month- and year-view, iCal 5 displays displays a leafing animation. This is not only childish, but also time consuming. And iCal accepts only one click at a time. Klick. Watch the sheet leaf. Klick. Watch the sheet leaf. Klick. Watch the sheet leaf. In iCal 4 it was just: Klick. Klick. Klick. Ready.

    I fully agree with this, one of the examples Apple tries to comply too 'natural' with the OLD world. We have evaluated, we don't need these old leather calendars on our computer devices anymore. Anyway, does somebody know how to get rid of at least the nice but irritating animation?

  • Is there any way to delete multiple spams at once, right now I go through each individually and delete it, but it's time consuming, thanks

    Is there any way to delete multiple spam messages at once. Right now I go through each individual spam and delete one at a time. This is very time consuming. Any tricks out there.
    Thank you

    Hi LRagsdale517,
    You should definitely be able to upload multiple files by Shift-clicking or Ctrl-clicking the files you want to upload. Just to make sure you don't have an old version of the service cached, please clear the browser cache and then log in to https://cloud.acrobat.com/files. After clicking the File Upload icon in the upper-right corner, you should be able so select multiple files for upload.
    Please let us know how it goes.
    Best,
    Sara

  • My computer has just prompted me to download the newest version of Itunes and now there doesn't seem to be any option to "add folder" to library, just "add file to library" so have to do one song at a time and is very time consuming!!  Help?!

    My computer has prompted me to install the newest version of Itunes and now there doesn't appear to be any option to "add folder to library", only "add file to library" so have to do each song individually and very time consuming....help!  Anyone know if I can get this feature back?  Thanks so much, Charlotte

    Use CTRL+B to put the top menu bar back on screen. Add File to Library and Add Folder to Library are both under File.

  • EMail on my iPhone 4s is no longer synching right with my Mac. Things I delete on my Mac are still on my iPhone. HELP!  Deleting in both places is so time consuming. It has worked until recently...not sure what changed!

    Things I delete on my Mac are still on my iPhone. HELP!  Deleting in both places is so time consuming. It has worked until recently...not sure what changed!

    Your email provider may have changed certain settings to do with deleting from server when deleting from client so that it no longer works. Are you using pop or imap? If pop then recreate the account using imap.

  • How to avoid the long time consuming process of settlement on periodic basi

    For investment Project(purpose of capitalisation) related expenses We would like to show it  Directly in Balance Sheet rather than P/L  A/C.Whether it is feasible or not?as per one of consultant it will be first hit the p/L and after settlement it will only be shown in B/Sheet.So how to avoid the long time consuming process of settlement on periodic basis.

    Hi, could you write down an example? And what you mean by investment project-is this an WBS?

  • I am an artist who built my site on iWeb 08. Although I have easily been able to transfer to Godaddy, my ability to publish is limited. I must upload my entire site and it is time consuming. How do I convert to iWeb 09 and is this easy to do?

    Help! I am an artist who had my site professionally designed on iWeb 08. Although I have  been able to transfer to Godaddy, my ability to publish is limited. I must upload my entire site and it is time consuming.  I was advised to update to IWeb 09 (which I could get, I think? from Amazon) because it has a built- in option to publish to any FTP. How do I convert my 08 folder to an 09 folder?  Will it convert correctly?  I know eventually I will need to rebuilt the site, but I would like to use this option for awhile to buy time. Is this feasible? I currently own a Mac Pro.

    Its just a question of installing the later version of iWeb from the iLife disk and opening your website in that version. Its a good idea to have a backup of your Domain.sites2 file before doing this. See this page for its location...
    http://www.iwebformusicians.com/iWeb/iWeb-Tips.html
    Publishing settings are shown here...
    http://www.iwebformusicians.com/iWeb/Publish-Website.html
    If you are using Lion/Mountain Lion, see this page for more info...
    http://www.iwebformusicians.com/iWeb/mountain-lion.html

  • I have a spam issue.  I'm running Mac Mail 7.3 on Mavericks.  Too many spam emails to control utilizing Preference option, plus time consuming. Would like to reject the email, not just place it in junk folder.  How to do?

    I have a spam issue.  I'm running Mac Mail 7.3 on Mavericks.  I am receiving many spam emails to control utilizing Preference option, plus time consuming to manage that way.  Would like to reject the email, not just place it in junk folder.  How to do?

    Try writing a rule. Sample below.

Maybe you are looking for

  • AOL is freezing my Mail

    I'm in dire need of a fix here because I can't even launch my Mail without it freezing and getting me the 'beach ball'. Is there any way I can delete my AOL account from Mail WITHOUT LAUNCHING IT? I tried deleting the folder in the Library>Mail secti

  • Flash stops playing sounds, then constant crashing.

    So this only started happening recently and the only thing I can think of that I have recently done is update my Adobe Flash (directly from their website) and Firefox auto updates itself. I'll be watching a Twitch steam, browsing YouTube or Tumblr an

  • Save or Remember a PerformancePoint page in its current state?

    Hi Experts, Is there any way to allow users to save a dashboard page? My client not only wants to have their last filter selections be remembered, but also any modifications that were made to the analytic charts or grids as well. When the user re-ope

  • Language/character problem

    I'm new to mac and have been trying to set up my email through road runner. When I switch to their website, everything changes from English to characters of some sort. What do I do to read it in English? My text encoding is set at default.

  • Is EchoSign included in an Acrobat subscription?

    I recently purchased a subscription to Pro XI.  I have created forms, inserted them on our web site, and sent them for signatures.  I want to do more with the signatures and I understand that I need to do that through Echo Sign.  I am being told I ne