Overcoming the IN LIST limit

Hi,
I've recently posted a question about this but right now, I'm to understand the concept. I'm going to give a bit of background in order to make it more understandable.
We have an application in which an object (A) contains a list of objects (B). Each of these objects in turn may contain objects (C). Each of these is a different type of object
Currently, we have designed a very simplistic pattern that follows:
- Load all Objects A according to user criteria
- Build a list of comma-separated IDs of Object A and retrieve Objects B using SELECT * FROM B WHERE ID IN (1, 2, 3, etc...)
- Use the B objects returned to build a comma-separated list of IDs of Object B and retrieve Objects C using this list as: SELECT * FROM C WHERE ID IN (4, 5, 6, etc...)
Now, this works, but only in very simple conditions.
Obviously my main concern is that it just won't work if you return more than 1000 Objects A or B at any point in time. The main problem I am facing now is regarding the way to make this work better, in terms of coding pattern and SQL optimization. IN is not that great with large sets as I understand it since it will use conditions such as 1 OR 2 OR 3 etc...
I've checked out Tom Kyte's website and the table type solution (http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:110612348061). It works, but my string parameter passed in could be more than 4,000 bytes for large reports... Soooo, I kept on reading and saw the BULK INSERT idea.
My question is the following: In an application where many users may run reports at the same time, is it even valid to consider doing this?
- LOAD --> BULK INSERT --> LOAD USING BULK INSERTED VALUES --> CLEAN UP CUSTOM TABLE
Hereby preventing other users from running their reports until this one is finished (unless I have one custom table per type of object)?
Or is the simple: LOAD OBJECTS A --> LOAD OBJECTS B USING SUBQUERY TO LOAD OBJECTS A better from the beginning? My main thing against it is that we run a query again after we just ran it so we already have the data we need but we have no choice but to re-write it.
I don't have anything against the BULK INSERT method etc... but for index usage and maintenance, the other solution just seems more complex for a performance that just would not be that great.
What do you think about it? And if you have the same problem as I do right now, how do you go around it?
Greg

Hi,
No no it's my bad, I actually did not realize that I mixing up some programming and Oracle concepts without being specific.
I'm assuming the problem with the 1000 list limit for an IN operator is understood though.
We perform several SELECT statements to retrieve records from our database. These records are used to instantiate java objects (this is in a J2EE application server, not in the Oracle JVM or java pool at all).
As an example (I apologize if it's a bad one), on the java side, we have a motherboard. It can contain one or more RAM slots. Each ram slot may contain a RAM module in it (for the sake of the example, I'll say it can contain one or more modules, just like old sockets...). On the database side, we have a MOTHERBOARD table, a RAMSLOT table, and a RAMMODULE table.
My question was the following: a user may run a report saying that he/she wants to get all motherboards' information in the database. Right now, the way it's been made is that we select all motherboards, get their unique identifier and build a comma-separated list of these ids (in the java code), and then do a
SELECT * FROM RAMSLOT WHERE MOTHERBOARD_ID IN (1, 2, 3 etc...).
And the same is done between RAMSLOT and RAMMODULE. The problem is that if more than 1000 motherboards exist, it just won't work.
Now, when I was looking at the ways to overcome this problem, I went to the Tom Kyte article mentioned. One solution is to create a function that will return a custom table type when passed in the string '1, 2, 3, etc...'. While this works with a small number of motherboards, well, if we loaded a lot of them and went over 4,000 bytes, we get a 'String Literal too long' error. This was mentioned on the AskTom article, to which the followup was: 'use BULK INSERT'. This is why I mention it. I guess what was meant is to load all the data in the custom type table and then perform as before.
This is why I was wondering how this could possibly be better than just re-writing the query as a subquery later (as undesirable as it might be).
Thanks for the help and please answer if anything isn't clear.
Greg

Similar Messages

  • I have three users each with PC/Mac and iPods, how do I overcome the '5 user limit'?

    I have three users each with PC/Mac and iPods, how do I overcome the '5 user limit'? If I create a new acct, will it blow out the library on the iPod?
    thx

    You don't.  5 is the limit of COMPUTERS that can be authorized to a single itunes account.  Ipods/iphones/ipad/Apple Tvs do NOT count toward the 5.

  • Howto overcome the 255 char limit in XSLT when outputting using method=text

    Hi, I am facing a problem in my XSLT program to output a CSV file. The header line is exceeding 255 char limit, seems built into the editor and looks like it repeats the 255th character into the next line where it finishes the rest of the line. Now this screws the columns in the CSV file. I have tried different combinations of <xsl:text></xsl:text> tags but to no avail.
    Is there a way to overcome this problem, spanning a line onto multiple lines in SAP but getting a single line in the output ?
    Thanks in advance.
    Swapan

    I should have known better to searched in SAP provided documentation instead here first. I needed to end the line with &> chars to continue into the next line.
    http://help.sap.com/saphelp_erp2004/helpdata/en/50/b6463c32a3fe13e10000000a114084/frameset.htm

  • Linking from slideshow to slideshow overcoming the 99 slide limit

    I have a 5 menu item menu. 4 items each go to 4 sections (a slideshow each..A, B, C, D).  A B C D are seperate slideshows.  I want to also have my 5th button be one that plays ALL (1-4 slideshows).  I can't figure out how to do it or where to look for info.  Can someone explain or show me to a tutorial?
    Thanks, -b

    Unless I am missing something, you should be able to do multiple Playlists, and populate them with the SlideShows that you want, and in the order that you need. As each SlideShow basically constitutes a Timeline (they are not really Timelines, but have some strong similarities), you should be able to handle them like a Timeline in the Playlist. I've not done this, as I create my SlideShows in PrPro, and Export as a DV-AVI to be Imported as a Timeline. Then, I use the Playlists to navigate as desired. One more benefit of doing the editing in PrPro is that there are no limits on the number of images.
    Good luck, and if the Playlist does not work, I am sure that Jeff, or another user, will correct me on my assumptions.
    Hunt

  • Is there a way to overcome the two-connection limit for XMLHTTPRequest?

    Hi, I'm using AIR SDK 2.5 from HTML/Javascript.
    According to the same origin policy (SOP) there's a max of two request that can be sent to the same domain/port using AJAX (XMLHTTPRequest).
    I have a long polled connection that is almost always using one ajax request, so I have only one left.
    Is there a way to change the security settings in order to allow more than two simultaneous requests to the same domain/port?
    Thanks,
    Guille

    Hi Guille,
    The AIR runtime is using the Internet Explorer network stack on Windows and the Webkit's on Mac and Linux. The maximum number of connections is limited by the corresponding stack and cannot be modified from AIR.
    Regards,
    -Catalin

  • Urgent: How to overcome the send mail limitation

    I am trying to use htmldb_mail PL/SQL package to send mail to 400 people, but get following message:
    "."WWV_FLOW_MAIL_QUEUE"."MAIL_TO" (actual: 3551, maximum: 2000)
    How do I overcome the limitation?
    Any suggestions will be greatly appreaciated.

    Things that spring to mind -
    1) Setup a mailing list on a mailserver (if you're using one like Exchange, Sendmail, Postfix etc) and have your application email the mailing list. That way your app sends out 1 email, and the mail server takes care of expanding the address list to the 400 people (this is probably the most 'efficient' way to do it).
    2) Do your mailing in part (e.g. 100 people at a time), so you send out 4 emails with each one addressed to a batch of 100 people
    3) Use the CC list (I don't believe the CC list has the same limit, but I haven't checked).
    4) Send out the emails individually, e.g. one email per recipient...this is an absolutely horrendous way to do it however, the load on your mailserver will be hugely increased and your mail administrator will probably shout at you, however it's an option (I wouldn't do it this way, but it is an option). I repeat....I'm not advocating you do it this way.....

  • IPhone 5s Recent Call List Limit

    What is the Recent Call List Limit for an iPhone 5s?
    Can you view the entire Recent Call List Limit from the screen?
    Today, as I would delete a call from the list, an older call would appear at the bottom of the list.
    Thanks!

    The Recent call list will display the last 100 calls.
    You can scroll through the list to see from the beginning to end.

  • I can't print wirelessly using Airport Express.  I have my HP printer connected to a USB hub, and the hub to the Airport Express, but when I select the HP from the printer list, my MacBook says the printer is "off-line" - even when it is not.

    I can't print wirelessly using Airport Express.  I have my HP printer connected to a USB hub, and the hub to the Airport Express, but when I select the HP from the printer list, my MacBook says the printer is "off-line" - even when it is not.  I've tried several USB connectors, and several different ports on my USB hub; same result.  I need to have the HP connected to the hub 'cause from there it's connected to our desktop Mac.

    Hi,
    I am currently replying to this as it shows in the iChat Community.
    I have asked the Hosts to move it to Snow Leopard  (you should not lose contact with it through any email links you get)
    I also don't do Wirelss printing so I can't actaully help either.
    10:01 PM      Friday; July 29, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.8)
     Mac OS X (10.6.8),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Client certificate authentication fails when the CA list sent by server is big and the list goes in 2 encrypted messages.

    I checked with IE browser(on windows and MAC) and MAC safari packet capture. The CA certificate list is sent by server in 2 messages as the list is too big. I compared packet by packet exchanges in both the browsers. It is same till TLSv1 handshake is done for the ldap certificate authentication. It works fine in IE without any issues though the certificate list is divided into 2 messages.
    In case of safari, after the TLSv1 handshake is done successfully, it again sends a SSLv3 'Client Hello' message and initiates the whole handshake process again and the server responds to it too till the handshake is complete. But it brakes after that with the server showing 'Cant establish secure connection' at the browser.
    The issue occurs only in case of MAC safari for big list of CA certs >150(where it crosses the max limit) from server. It is not clear why safari alone is switching from TLSv1 to SSLv3 in this scenario.
    NOTE: With shorter list of CA certs at server when it goes in one message, safari works fine and all messages are only TLSv1 and does not repeat the handshake process.
    I have checked on safari version 5 and 6.0.3 on OS X mountain lion.
    Is there any specific reason why MAC safari behaves like this or somethings needs to be done at server?
    Any help would be appreciated.

    I checked with IE browser(on windows and MAC) and MAC safari packet capture. The CA certificate list is sent by server in 2 messages as the list is too big. I compared packet by packet exchanges in both the browsers. It is same till TLSv1 handshake is done for the ldap certificate authentication. It works fine in IE without any issues though the certificate list is divided into 2 messages.
    In case of safari, after the TLSv1 handshake is done successfully, it again sends a SSLv3 'Client Hello' message and initiates the whole handshake process again and the server responds to it too till the handshake is complete. But it brakes after that with the server showing 'Cant establish secure connection' at the browser.
    The issue occurs only in case of MAC safari for big list of CA certs >150(where it crosses the max limit) from server. It is not clear why safari alone is switching from TLSv1 to SSLv3 in this scenario.
    NOTE: With shorter list of CA certs at server when it goes in one message, safari works fine and all messages are only TLSv1 and does not repeat the handshake process.
    I have checked on safari version 5 and 6.0.3 on OS X mountain lion.
    Is there any specific reason why MAC safari behaves like this or somethings needs to be done at server?
    Any help would be appreciated.

  • Request no longer in the PSA list in RSA1

    First of all, let me state that my PSA display settings are "Show all Request" and "No Time Limit".
    What I did was delete a request out of an ODS, then reposted it from the PSA list in RSA1 by right clicking on selecting "Start the Update Immediately".  The request posted to the ODS and is still in the PSA table as I can see it in SE16.
    However, I can no longer see it in the list of requests in the PSA via RSA1.  Any idea why not?

    Hi,
    In RSA1 click on the PSA in the Modelling tab
    Then from menu Settings>Display Selection for PSA Tree>Select the appropriate time limits
    This will display the PSA requests for the specified period.
    Assign points if it is helpful.
    Regards,
    Sreedhar

  • How do I change the attachment size limit in Calendar Server 6.3, UWC, IWC?

    How do I properly increase or decrease the attachment size limit with Calendar Server and all supported user interfaces to it such as WCAP, UWC (Communications Express) and IWC (Convergence)? From my experience with the Outlook Connector, there seems to be some limit imposed by cshttpd on the size of a file upload (I believe I actually got an HTTP error code back on the wcap request indicating something was too big, sorry I don't have it handy, I'll have to re-test). Additionally, it seems UWC imposes additional limits (Example: http://docs.sun.com/app/docs/doc/819-4440/6n6jfgcjh?l=en&a=view&q=fileSizeHardLimit) but I can't seem to get those to work at all. I found many different web.xml related to UWC and I'm not sure which one to change, I tried a couple but had no success because UWC would always report this error if I uploaded between 4-5 megs: com.iplanet.jato.util.WrapperRuntimeException
    Root cause = [java.io.IOException: Request cancelled because file input field
    "importFile" size is over the configurable limit of 4194304 bytes; see filter init
    parameter fileSizeHardLimit]
    And it would complain about requestSizeLimit I think if it was over 5 megs, claiming that limit was 5242880. IWC gives a generic error when the upload is too big and rejects it.
    I fear that a 4 meg limit will be too imposing and of limited value, so I would either like to raise it, or consider lowering it to 0 bytes so attachments cannot be used at all. I have been looking high and low for information on how to do this and all I can find is the UWC examples. I plan to support the Outlook Connector, UWC, and IWC so the limits should ideally be the same across each. Some of the Exchange data we wish to import does have some attachments so it would be good to continue support for that. I did see some other posts about quota RFEs but at this point I am not concerned about the disk consumption. Can anyone help? Thanks. Please let me know if there is any more information I can provide. I am running SCS6u1 on Solaris 10 SPARC.

    Fred@egr wrote:
    Thanks!!! This is working with IWC and I am pretty sure it will work with Outlook. I didn't think to look at config options for mshttpd since I don't have it installed and ics.conf doesn't list the http.service.maxmessagesize and service.http.maxpostsize by default.http.service.maxmessagesize is only relevant to mshttpd, not cshttpd. service.http.maxpostsize applies to both.
    UWC is still limiting me though; I'm sure I can reconfigure UWC if I just know which file to edit and if I need to redeploy anything. I'm using the same install paths as the SCS6 Single Host example and I'm not sure which the "uwc-deployed-path" is supposed to be. Again, thanks.If you have deployed UWC/CE to Application Server you would edit the following file and restart application-server:
    /opt/SUNWappserver/domains/domain1/generated/xml/j2ee-modules/Communications_Express/web.xml
    e.g.
      <filter>
        <filter-name>MultipartFormServletFilter</filter-name>
        <filter-class>com.sun.uwc.calclient.MultipartFormServletFilter</filter-class>
        <init-param>
          <param-name>fileSizeHardLimit</param-name>
          <param-value>15485760</param-value>
        </init-param>
        <init-param>
          <param-name>requestSizeLimit</param-name>
          <param-value>15485760</param-value>
        </init-param>
        <init-param>
          <param-name>fileSizeLimit</param-name>
          <param-value>15485760</param-value>
        </init-param>
      </filter>Regards,
    Shane.

  • I am trying to set up a child account where websites are restricted unless they are on the approved list, however youtube is still allowed.  How do I block youtube?

    I am trying to set up a child account where websites are restricted unless they are on the approved list, however youtube is still allowed.  How do I block youtube?

    Hello jmkibert,
    Thank you for using Apple Support Communities.
    For more information, take a look at:
    OS X Mavericks: Set up parental controls
    http://support.apple.com/kb/PH14414
    Web > try to limit access to adult websites > customize > never allow these websites.
    Have a nice day,
    Mario

  • Bug with Lightroom 4? - Big problem in the keyword list!!

    Hello guys,
    I am Rafael Rojas, a nature and landscape photographer. This is my first post, trigered by a quite bothering problem I am having with my LR...So hello everybody!
    I upgraded to LR 4 a week ago. Today I realized many of the keywords I have installed in Lightroom do not appear on the keyword list (basically all keywords after the letter S). Moreover, half of the keywords which appear on the list are not editable: that is, I cannot assign them to the selected image (by clicking on the left box), or I cannot double click them or right click them to get the Edit panel. All the rest of keywords (those which appear on the list on top), can be edited and there is no problem.
    When I export the keywords as a .txt file (in metadata, export keywords) I can see that all the keywords are there. When I try to write some of them on the box LR recognize them and adds them automatically. However, I just cannot see them on my keyword list or just cannot edit them.
    The reason I want to edit the keywords is because many of them got desactivated while upgrading (something more people have reported). Right now, I cannot send my images to my stock galleries, since many of my important keywords are not active, and I just cannot edit them...
    Can you help me please?
    thanks so much!!
    rafael

    Well, 64 bits.
    And yes, it seems when I erase one keyword, the list "shows" one more below...so it seems the problem is related to a certain limit in number.
    That would be still a problem I could live with, the big problem tough is that many of the keywords got "deactivated" alone by Lightroom (see problem here described http://www.backyardsilver.com/2012/02/strange-behavior-with-capitalized-keywords/) and that means I NEED to edit some keywords which are really important and which are not active. Otherwise, when I export the images those keywords are not embedded...
    Any thoughts?
    Rafa

  • Organization of the dirty buffers in the write list

    Hello,
    1.) Where places the server process the dirty buffers in the write list, at the beginning or at the end? Dirty buffers would like to become a flag in the write list? Can anybody explain me the organisation of the WRITE LIST of the database buffer cache?
    2.) My Oracle book says that the DBWr process moves the dirty buffers from the end of the LRU list to the disk. I mean that the DBWr process moves the dirty buffers from the WRITE LIST to the disk. What is correct?
    best regards,
    keule

    Great question. Hopefully, the following excerpt clarifies things for you.
    From the 9i Concepts, Chapter 7:
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96524/c08memor.htm#8537
    Organization of the Database Buffer Cache
    The buffers in the cache are organized in two lists: the write list and the least recently used (LRU) list. The write list holds dirty buffers, which contain data that has been modified but has not yet been written to disk. The LRU list holds free buffers, pinned buffers, and dirty buffers that have not yet been moved to the write list. Free buffers do not contain any useful data and are available for use. Pinned buffers are currently being accessed.
    When an Oracle process accesses a buffer, the process moves the buffer to the most recently used (MRU) end of the LRU list. As more buffers are continually moved to the MRU end of the LRU list, dirty buffers age toward the LRU end of the LRU list.
    The first time an Oracle user process requires a particular piece of data, it searches for the data in the database buffer cache. If the process finds the data already in the cache (a cache hit), it can read the data directly from memory. If the process cannot find the data in the cache (a cache miss), it must copy the data block from a datafile on disk into a buffer in the cache before accessing the data. Accessing data through a cache hit is faster than data access through a cache miss.
    Before reading a data block into the cache, the process must first find a free buffer. The process searches the LRU list, starting at the least recently used end of the list. The process searches either until it finds a free buffer or until it has searched the threshold limit of buffers.
    If the user process finds a dirty buffer as it searches the LRU list, it moves that buffer to the write list and continues to search. When the process finds a free buffer, it reads the data block from disk into the buffer and moves the buffer to the MRU end of the LRU list.
    If an Oracle user process searches the threshold limit of buffers without finding a free buffer, the process stops searching the LRU list and signals the DBW0 background process to write some of the dirty buffers to disk.

  • Limiting the hit list

    Hi all,
    I’m writing a pricing report which has a field condition type on the selection screen.
    I want to limit the hit list of this field to merely display the condition types with usage A, application M when user clicks F4.
    What should I do? Should I use matchcode?
    Thanks in advance.

    you can use the following FM to provide your own values to the F4
    F4IF_INT_TABLE_VALUE_REQUEST
    check out this link for sample code
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap faqs.faq#q-9
    <b><u>alternate method.</u></b>
    wf_repid = sy-repid.
      wf_dynnr = sy-dynnr.
      call function 'F4IF_FIELD_VALUE_REQUEST'
        exporting
          tabname                   = 'TKA03'
          fieldname                 = 'STAGR'
          searchhelp                = 'Y_TKA03'
    *   SHLPPARAM                 = ' '
          dynpprog                  = wf_repid
          dynpnr                    = wf_dynnr
          dynprofield               = 'WF_F_STAGR'
    *   STEPL                     = 0
          value                     = 'HC*'
    *   MULTIPLE_CHOICE           = ' '
    *   DISPLAY                   = ' '
    *   SUPPRESS_RECORDLIST       = ' '
    *   CALLBACK_PROGRAM          = ' '
    *   CALLBACK_FORM             = ' '
    * TABLES
    *   RETURN_TAB                =
    * EXCEPTIONS
    *   FIELD_NOT_FOUND           = 1
    *   NO_HELP_FOR_FIELD         = 2
    *   INCONSISTENT_HELP         = 3
    *   NO_VALUES_FOUND           = 4
    *   OTHERS                    = 5 .
    <b>This would return values starting with HC*</b>
    Regards
    Raja

Maybe you are looking for