Need to write a query that takes more than 2 minutes to execute

Hi ,
I am using Oracle 10g as my DataBase.
I am writing a small program for Testing purpose , in that my requirement is to write a query that takes more than 2 minutes to execute .Right now i have only a small Table called as "Users" with very less data .
Please let me know how can i achieve this thing ??
Thanks .

So please tell me , how can i achieve this . Thanks in advance .P. Forstman's example above will probably be more reliable, but here's an example of my idea - harder to control timing (untested)
select count(*)
  from dba_objects o, dba_tables t, dba_tab_columns tc
where o.object_name||'' = t.table_name||''
   and o.owner||'' = t.owner||''
  and t.table_name||'' = tc.table_name
  and t.owner||'' = tc.owner||''

Similar Messages

  • Need help on downloading apps that are more than 20MB in size

    I can only download apps less than 20MB in size. If i want to download others that are larger than 20MB, i have to use wifi... But after I connected my phone to my home network and clicked on the app, I am still unable to download it... The only message that pops up is to prompt me to connect to wifi.... but I thought I have connected it already??! So now the apps are grey in colour and stuck at the "loading" stage... Does anyone know how I can solve this problem? Thanks.

    Hello, thanks for your answer... yups you are right, i went to the app store on the phone and the downloads started again.
    I have one that is 22MB, one 124MB and one 36MB.... but i have tried to download those which are above 40MB but they can work... I don't know what happened to thes 3 apps...
    Oh my, I have just started using iphone for 2weeks and i dun suppose my phone is out of space already?!! currently there are less than 40apps...
    And the problem is i can't delete these apps that are stuck? when i press and hold, there is no "cross" at the top left hand corner... and i tried to uncheck the boxes in itunes to "un-sync" them.... but the apps remain greyed out on my phone... do you have any other ways to delete them?
    Thanks alot!

  • How do we tune a query that takes more time for the first time?

    Hi,
    First time it takes 20 secs and subsequent times 2 secs.
    Let me know if you need more info
    Thanks

    Following are the parameters set at the DB level.
    .__db_cache_size=2214592512
    .__java_pool_size=16777216
    .__large_pool_size=16777216
    .__shared_pool_size=1543503872
    .__streams_pool_size=33554432
    *._optimizer_cost_based_transformation='off'
    *._smu_debug_mode=4
    *.compatible='10.2.0.1.0'
    *.cursor_sharing='SIMILAR'
    *.db_block_size=8192
    *.db_domain=''
    *.db_file_multiblock_read_count=16
    *.job_queue_processes=10
    *.open_cursors=5000
    *.optimizer_mode='ALL_ROWS'
    *.pga_aggregate_target=1277165568
    *.processes=250
    *.remote_login_passwordfile='EXCLUSIVE'
    *.sessions=1000
    *.sga_target=3833593856
    *.undo_management='AUTO'
    *.undo_tablespace='UBPTAB_UNDO'
    Execution Plan
    Plan hash value: 2107556093
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 45157 | 29M| | 9094 (1)| 00:01
    :50 |
    | 1 | SORT ORDER BY | | 45157 | 29M| 78M| 9094 (1)| 00:01
    :50 |
    |* 2 | TABLE ACCESS FULL| <tname>| 45157 | 29M| | 2564 (2)| 00:00
    :31 |
    Following are result from dba_tab_statistics.
    NUM_ROWS BLOCKS EMPTY_BLOCKS AVG_CACHE_HIT_RATIO AVG_ROW_LEN
    112704 11520 768 685
    AVG_SPACE_FREELIST_BLOCKS NUM_FREELIST_BLOCKS
    0 0
    Follwing was the time it has taken to generate the explain plan report after issuing the below command.
    set autotrace traceonly
    Elapsed: 00:00:15.49
    Following is the statistics
    Statistics
    0 recursive calls
    0 db block gets
    11380 consistent gets
    0 physical reads
    0 redo size
    8823636 bytes sent via SQL*Net to client
    37731 bytes received via SQL*Net from client
    3019 SQL*Net roundtrips to/from client
    1 sorts (memory)
    0 sorts (disk)
    45267 rows processed
    Pl let us know how to tune the same.
    Thank you all for the help

  • Possible to write a function that takes any type as parameter ?

    I need to write a function that will take 2 parameters ( of any type - VARCHAR etc ) and return a boolean.
    ( Im trying to write a function that will do NULL processing.
    something like..
    if ( P1=P2 OR ( P1 IS NULL AND P2 IS NULL ) ) then
    return true ;
    end if;
    return false ;
    the function simply compares its parameters P1 & P2 and returns true if they are equal - including if both are NULL
    Is this possible to write at all.
    My code looks very ugly without this being wrapped in a function.

    You may be able to use SYS.AnyData for this. However, dealing with the data would be confusing, so overloading the FUNCTION would most likely be a better idea.
    This doesn't work, but it looked like fun, so i tried:
    CREATE OR REPLACE FUNCTION Equal_Or_NULL(A SYS.AnyData, B SYS.AnyData)
    RETURN PLS_INTEGER
    AS
    Local_A     VARCHAR2(4000);
    Local_B     VARCHAR2(4000);
    Junk          PLS_INTEGER;
    BEGIN
    IF A IS NULL AND B IS NULL THEN RETURN 1; END IF;
    CASE A.GetTypeName
      WHEN 'SYS.NUMBER'     THEN Junk := A.GetNumber(Local_A); Junk := B.GetNumber(Local_B);
      WHEN 'SYS.DATE'     THEN Junk := A.GetDate(Local_A); Junk := B.GetDate(Local_B);
      WHEN 'SYS.CHAR'     THEN Junk := A.GetCHAR(Local_A); Junk := B.GetCHAR(Local_B);
      WHEN 'SYS.VARCHAR'     THEN Junk := A.GetVARCHAR(Local_A); Junk := B.GetVARCHAR(Local_B);
      WHEN 'SYS.VARCHAR2'     THEN Junk := A.GetVARCHAR2(Local_A); Junk := B.GetVARCHAR2(Local_B);
    END CASE;
    RETURN CASE WHEN Local_A = Local_B THEN 1 ELSE 0 END;
    END Equal_Or_NULL;
    /Overloading would be much simpler, as the arguments could be directly compared.
    IMO, Do not do this. Hiding logic in a FUNCTION it for cosmetic purposes is a bad idea.

  • I need to add a single field from with_item table . need to write select query with reference to company code , account doc no , fiscal year

    I need to add a single field from with_item table . need to write select query with reference to company code , account doc no , fiscal year

    Hi Arun ,
    Can you explain little bit more ??
    what is account doc no? 
    what are the transactions should be displayed in your output??
    -Rajesh N

  • Ldap search query takes more than 10 seconds

    LDAP query takes more than 10 seconds to execute.
    For validating the policy configured, the Acess Manager(Sun Java System Access Manager) contacts the LDAP (Sun Java System Directory Server 6.2) to get the users in a dynamic group. The time out value configured in Access Manager for LDAP searches is 10 seconds.
    Issue : The ldap query takes more than 10 seconds to execute at some times .
    The query is executing with less than 10 seconds in most of the cases, but it takes more than 10 seconds in some cases. The total number of users available in the ldap is less than 1500.
    7 etime =1
    6 etime =1
    102 etime=4
    51 etime=5
    26 etime=6
    5 etime=7
    4 etime=8
    From the ldap access logs we can see the following entry,some times the query takes more than 10 seconds,
    [28/May/2012:14:21:26 +0200] conn=281 op=41433 msgId=853995 - SRCH base="dc=****,dc=****,dc=com" scope=2 filter="(&(&(***=true)(**=true))(objectClass=vfperson))" attrs=ALL
    [28/May/2012:14:21:36 +0200] conn=281 op=41434 msgId=854001 - ABANDON targetop=41433 msgid=853995 nentries=884 etime=10
    The query was aborted by the access manger after 10 seconds.
    Please post your suggestions to resolve this issue .
    1.How we can find out , why the query is taking more than 10 seconds ?
    2.Next steps to resolve this issue .

    Hi Marco,
    Thanks for your suggestions.
    Sorry for replying late. I was out of office for few weeks.
    1) Have you already tuned the caches? (entry cache, db cache, filesystem cache?)
    We are using db cache and we have not done any turning for cache. The application was working fine and there was no much changes in the number of users .
    2) Unfortunately we don't have direct access to the environment and we have contacted the responsible team to verify the server health during the issue .
    Regarding the IO operations we can see that, load balancer is pinging the ldap sever every 15 seconds to check the status of ldap servers which yields a new connection on every hit. (on average per minute 8 connections - )
    3) We using cn=dsameuser to bind the directory server. Other configuration details for ldap
    LDAP Connection Pool Minimum Size: 1
    LDAP Connection Pool Maximum Size:10
    Maximum Results Returned from Search: 1700
    Search Timeout: 10
    Is the Search Timeout value configured is proper ? ( We have less than 1500 user in the ldap server).
    Also is there any impact if the value Maximum Results Returned from Search = set to 1700. ( The Sun document for AM says that the ideal value for this is 1000 and if its higher than this it will impact performance.
    The application was running without time out issue for last 2 years and there was no much increase in the number of users in the system. ( at the max 200 users added to the system in last 2 years.)
    Thanks,
    Jay

  • QUERY TAKES MORE THAN 30 MINUTES AND IT'S CANCELED

    Hi
    I have one workbook and sometimes it takes more than 30 minutes to be executed, but Discoverer cancels it, Does anybody know how to alter this? I mean if the query takes more than 30 minutes i need it to be finished.
    Any help will be appreciated.
    Best Regards
    Yuri López

    Hi
    You need to alter the timeout settings and these are located in multiple places.
    Discoverer Plus / Viewer using this workflow:
    1. Edit the pref.txt file on the server located here: $ORACLE_HOME\discoverer\util
    2. Locate the preference called Timeout and change it to your desired value in seconds. The default is 1800 which means 30 minutes
    3. Save pref.txt
    4. Execute applypreferences.bat if running on Windows or applypreferences.sh if running on Linux or Unix
    5. Stop and restart the Discoverer server
    Discoverer Administrator using this workflow:
    1. Launch Discoverer Administrator
    2. From the menu bar, select Tools | Privileges
    3. Select the user
    4. Open the Query Governor tab
    5. If "Prevent queries from running longer than" is checked, increase the limit
    6. Click OK
    Note: if "Prevent queries from running longer than" is not checked then the Timout in the pref.txt controls how long before the queries stop. If it is checked and it is lower than Timeout you need to increase it.
    Let me know if this helps
    Best wishes
    Michael Armstrong-Smith
    URL: http://learndiscoverer.com
    Blog: http://learndiscoverer.blogspot.com

  • How to write a method that takes two arguments of same type

    Hi,
    I seldom do anything "advanced" in generics, but I've done my reading, and thought that I had an understanding of the basics, but I'm stuck on this. How do I write a method that takes two arguments that must be of exact same type.
    I've tried something like:
    public class GenericsTest1 {
        public static <T> void compare(T first, T second) {
    }But the compare method can in this case be called with e.g.
    String arg1 = null;
    Long arg2 = null;
    compare(arg1, arg2);I can restrict the call to something like GenericsTest1.<Long>compare(arg1, arg2), but I don't want to do it in the location that calls the method, and the method can still be invoked with subclasses of the specified type. E.g. this is valid (but I don't want it to be valid):
    Number arg1 = null;
    Long arg2 = null;
    GenericsTest1.<Number>compare(arg1, arg2);So I then changed the method into something like this:
    public class GenericsTest2 {
        public static <T, E extends T> void compare(T first, E second) {
    }It feels like I'm half way there now. Compare can't be called with e.g:
    Long arg1 = null;
    Number arg2 = null;
    compare(arg1, arg2);But this is still valid:
    Number arg1 = null;
    Long arg2 = null;
    compare(arg1, arg2);Hmm... So what to do? I only want the method to be callable when arg1 and arg2 is of exact same type. Everything else should give a compilation error.
    Kaj
    Ps. No, I don't have a need for this, I'm just curious.

    dannyyates wrote:
    I haven't gone through everything you've written, but I would expect that in the first instance, it's inferred <T> to be Object. This is a good reason to parameterise the class rather than the method wherever that makes sense.Thanks for you reply, but as I said this isn't related to anything that I'm going to use. I just want to know if it ca ben done with a static method and generics.
    Kaj

  • When I close my iPhone and I want to open it to use it again, the opening process takes more than an hour, I regretted to buy the iPhone because of this problem that you do not suffer at all with Nokia,how I can solve this problem?

    When I close my iPhone and I want to open it to use it again, the opening process takes more than an hour, I regretted to buy the iPhone because of this problem that you do not suffer at all with Nokia,how I can solve this problem?

    mostafa182 wrote:
    ... how I can solve this problem?
    The Basic Troubleshooting Steps are:
    Restart... Reset... Restore from Backup...  Restore as New...
    Restart / Reset
    http://support.apple.com/kb/ht1430
    Backing up, Updating and Restoring
    http://support.apple.com/kb/HT1414
    If you try all these steps and you still have issues... Then a Visit to an Apple Store or AASP (Authorized Apple Service Provider) is the Next Step...
    Be sure to make an appointment first...

  • I used scripting brigde to add a movie that has size bigger than 5GB, exactly after two minutes iTunes return a failed, but the processing of the file is actually added to iTunes Library successfully. The copying take more than 5 minutes to complete. Why?

    I used scripting brigde to add a movie that has size bigger than 5GB, exactly after two minutes iTunes return a failed, but the processing of the file is actually added to iTunes Library successfully. The copying take more than 5 minutes to complete. Why the iTunes Scripting Brigde returned failed when it is actually success? It occurred exactly 2 minutes after submit the request to Scripting Brigde. Is this 2 minutes related to the Apple Event time out? if it does, how do I get around this problem? thx

    I can tell you that this is some of the absolutely worst customer service I have ever dealt with. I found out from a store employee that when they are really busy with calls, they have third party companies taking overflow calls. One of those companies is Xerox. What can a Xerox call center rep possibly be able to authorize on a Verizon account?  I'm Sure there is a ton of misinformation out there due to this. They don't note the accounts properly or so everyone can see them. I have been transferred before and have asked if they work for Verizon or a third party also and was refused an answer so, apparently they aren't required to disclose that information. I spent a long time in the store on my last visit and it's not just customers that get the runaround. It happens to the store employees as well and it's beyond frustrating.

  • Is it true that iPhone 4s does not allow to take more than 1000 photos?

    Hi!
    Is it true that iPhone 4s does not allow to take more than 1000 photos?
    http://dolboeb.livejournal.com/2299939.html

    Not true.
    Only Photostream is allowed to take a max of 1000 photos, then they will be removed from server/icloud.

  • 6 million + records, query takes more than 50 min to execute.

    Hi
    I am trying to get records from a table which has more than 6 million of records.
    The value set of the particular col IND can be
    NULL
    '0'
    '1'
    and other value like A B '6'
    The data type of IND is varchar.
    I want all the records where the value is other than NULL, 0 and 1
    I tried this simple query
    SELECT ID, IND
    FROM tablename
    WHERE
    IND IS NOT NULL
    AND IND <> '0'
    AND IND <> '1'
    Now this query is taking more than 30-40 min. Is this a way I can speed up this query. Also I can't index on the column.
    any suggestions ?

    I don't know anything about your tables or hardware (nor your Oracle version because you didn't post it) but 30 - 40 minutes seems excessive for a full table scan on only 6 million rows.
    On my lowly test instance, this full table scan takes a little over a minute:
    | Id  | Operation          | Name                  | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |                       |     1 |     4 |  4800   (2)| 00:01:11 |
    |   1 |  SORT AGGREGATE    |                       |     1 |     4 |            |          |
    |   2 |   TABLE ACCESS FULL| ATLAS_SALES_HISTORY   |  6618K|    25M|  4800   (2)| 00:01:11 |
    Statistics
            631  recursive calls
              0  db block gets
          55740  consistent gets
          55609  physical reads
              0  redo size
            415  bytes sent via SQL*Net to client
            346  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
             15  sorts (memory)
              0  sorts (disk)
              1  rows processedAre you pulling all 6 million rows across the network to your client machine? (And waiting for the rows to scroll?)

  • Need to write a query while configuring Database Adapter

    Hi,
    I am working in BPEL.i need to write a query while configuring the DB adapter. i need to query a table which contains five rows each row containing 7 columns. my query should be like if i give the first column name(for eg:Title) it should return the complete row(i.e all the 7 columns in a row).
    So after deploying during testing when i give the Column name(Title) in the BPEL console it should return the row.
    How to write a query such tht if i give any title name in the five rows it should return the respective row
    please help me out.
    Regards,
    Mohamed

    Hi,
    I got the answer for this.its working fine now.
    the query is: select TITLE,..... from movie where (TITLE =#title);
    The second "title" will be the one which i am going to give in bpel console
    so it wil check with the "TITLE" in the table and execute the query.
    Regards,
    Mohamed

  • I'm having trouble with my iCloud photos. I thought i could be a little sneaky and take a photo of my photos that were more than 30 days old, so they would be uploaded along with my new photos. that part worked, but i can't upload them to Snapfish?!

    i'm having trouble with my iCloud photos. I thought i could be a little sneaky and take a photo of my photos that were more than 30 days old, so they would be uploaded along with my new photos. that part worked, but i can't select them to upload them to Snapfish?! Any thoughts? I'm bummed. I've got a few hundred photos on my iPhone that I'd like to move seemlessly - or somehow at all.

    hopefully something in here is helpful?
    http://support.apple.com/kb/HT4486

  • Every page I load takes more than a minute to load - clicking anywhere gives message that firefox is not responding. I don't like this version, it sucks - tabs are not defined well, can barely see them.

    for instance, if I load www.msnbc.com it will take more than a minute to fully load in that if I click on a link or try to scroll, the entire browser locks up, if I try to scroll, or click on the page, I get the message that the program is not responding.

    If you've updated from a version as ancient as 3.5.4, then you run the risk of encountering problems. You should start with a fresh profile to ensure old preferences, data files and changes made by extensions are not interfering.
    First, create a backup copy of your profile folder, just to be safe.
    * [[Back up and restore information in Firefox profiles]]
    Then use the Reset Firefox feature.
    * [[Reset Firefox – easily fix most problems]]
    If the problem persists, see the following article.
    * [[Firefox hangs or is not responding - How to fix]]
    Do not reinstall old versions of Firefox. They contain security vulnerabilities and shouldn't be used. Very old versions might also be unable to handle data files in your profile folder in their new formats, which can lead to all sorts of problems. And lastly, many websites require a modern browser to work properly.
    * https://www.mozilla.org/security/known-vulnerabilities/firefox.html

Maybe you are looking for