Find entries with several conditions, including the comparison

Hello

I take the edition of I v6.2.7 a ride, I'm looking at the use case is the following. I have a "table" with about 100 k records defined by this object:

@Entity
public class LTROW {

  @PrimaryKey
    private Integer id = null;

    @SecondaryKey(relate=Relationship.MANY_TO_ONE)
    private Integer tableId = null;
    
    @SecondaryKey(relate = Relationship.MANY_TO_ONE)
  private String col0 = null;
    @SecondaryKey(relate = Relationship.MANY_TO_ONE)
    private String col1 = null;
    @SecondaryKey(relate = Relationship.MANY_TO_ONE)
    private String col2 = null;
    @SecondaryKey(relate = Relationship.MANY_TO_ONE)
    private String col3 = null;
    @SecondaryKey(relate = Relationship.MANY_TO_ONE)
    private String col4 = null;
    @SecondaryKey(relate = Relationship.MANY_TO_ONE)
    private String col5 = null;
    @SecondaryKey(relate = Relationship.MANY_TO_ONE)
    private String col6 = null;
    @SecondaryKey(relate = Relationship.MANY_TO_ONE)
    private String col7 = null;
    
    private String result0 = null;
    private String result1 = null;
    private String result2 = null;
    private String result3 = null;
    private String result4 = null;
// ...
}

Typical research I must apply is: give me all the entries contained in tableId X where the value of co0 is equal to 7, 1112 exceeds the value of col1 and col2 value is less than 8.

I got in the definition of index for all columns defined in the class, but can't seem to understand how to combine these criteria. I looked at EntityJoin but it doesn't seem to be what I'm looking for.

Thank you!

You cannot use multiple indexes for this kind of query. Instead, create and use a single index for one of the conditions and filter on other conditions. I hear, by 'filter' select the records you want using an 'if' statement Try to choose the index that returns the smallest number of records.

See:

http://www.Oracle.com/technetwork/database/database-technologies/BerkeleyDB/performing.PDF

-mark

Tags: Database

Similar Questions

  • [cs3] [JS] Find entry with no text in the Layout

    Hello

    I need to enter a Layout.I without any text (idle) have used the following code.

    app.findGrepPreferences = NothingEnum.nothing;
    app.changeGrepPreferences = NothingEnum.nothing;

    app.findGrepPreferences.findWhat = "\n";
    app.findChangeGrepOptions.includeFootnotes = false;
    app.findChangeGrepOptions.includeHiddenLayers = false;
    app.findChangeGrepOptions.includeLockedLayersForFind = false;
    app.findChangeGrepOptions.includeLockedStoriesForFind = false;
    app.findChangeGrepOptions.includeMasterPages = false;

    var myFoundItems = new Array;
    myFoundItems = app.activeDocument.findGrep ();
    var len = myFoundItems.length;
    Alert (Len);

    I don't know if my approach is correct or not? Please suggest me.

    Concerning

    Kumar

    Try this:

    app.findGrepPreferences.findWhat = "" ^ \\r ";"

    @+

    Marc

    [Edit: paragraph meta is not \nand \r ]

  • Several Conditions on the stage of processing of forms?

    You are allowed to set several options in the Conditions of implementation of a conditional processing step Editor. However, unlike filters in a Segment, the Conditions Editor doesn't tell you if the conditions are joined by 'and' or 'or '. So in the example below, step run, for anyone who enters their State as the Georgia or Florida? Or would look of someone who had both the Georgia AND Florida as a State and, since you can't have both, not run processing step?

    Conditional_Form_Processing_Steps.png

    Thank you.

    If you try to 'OR', depending on the processing stage, you can try to use the option "use a drop-down list to select... "on the stage of treatment rather than using the option under certain conditions. Using a drop-down list, you can download a list of States (like your model) under the name of the Option, then the code active for e-mail, landing page, shared list, etc. for the value of the Option. This avoids the multiple processing steps using different conditionalities.

    Just download the ID and the values in a list of successful selection

    For emails and landing pages active IDS are easy to find using the URL that is displayed when you have open in Eloqua:

    https://secure.P03.Eloqua.com/main.aspx#landing_pages&ID= 115


    Update processing step to «Use a drop-down list to select...» ", select the form field and the managed choice list you downloaded.

  • Appeal with several parameters of the URL

    Hello!

    I'm unable to call a procedure by URL with several parameter, a parameter is passed to the following example, the syntax would be like spending several parameters?

    # OWNER #. PK_UTIL. PKB_TXT? En_param1 = xxx

    How to include the second parameter? I tried several and could not happen.

    Thank you

    Márcio Goncalez

    This isn't really a question of APEX but more close mod_plsql or the apex listener I think?

    Have you tried?

    # OWNER #. PK_UTIL. PKB_TXT? En_param1 = xxx & En_param2 = yyy

    James

  • deployment of a BPM Application large Oracle with several projects of the user interface

    Hello world
    I'm working on a large application with Oracle BPM 11.1.1.5.0.

    I use JDeveoper 11.1.1.5.0 to build the application.
    The application has many tasks user with a lot of the UI (one for each task of the user).

    My problem is, whenever I make a small change in the project, I need to deploy this, which includes a master project and five or six projects UI (for now) for tasks of the user.
    As demand grows, I'm sure that this will certainly become a problem.

    So my question is if I do this the good sense? or should there be a more effective way?

    Thanks in advance

    Published by: luke on April 17, 2012 12:16 AM

    Hi Luke
    1. as a general rule, there is NO need to have a user interface project for an individual task. As initiator, approver, reviewer, LegalApprover etc etc, you have like 10 tasks (.task files). You can have just a single project of TaskForms UI and have taskDetails.jspx generated for each of these tasks. This is appropriately.

    2. any Application workflow must have only 2 deployers. Deploy resources are for real Workflow stuff that will have the main BPEL or process, BPM, human tasks etc. Basically, everything that goes into the workflow project. And another official of the deployment is that the REST of things means that the UI TaskForms project and other project support as useful projects, WebServices, EJB projects (if you have Web services). All this will be deployed as a SINGLE EAR.

    Lets take an example JDeveloper IDE point of view.
    1. application Name: SalesOrderApp
    2 workflow project name: SalesProcess (he is a a project jdeveloper project SOA or BPM Project type and has all human tasks, bpels, process bpm, rules etc.).
    3 interface user Project: SalesTaskForms (it is a form generated automatically for the first task you choose. Then for the rest of the tasks you can use this same project, to generate jspx for all others. WORK files. VIEW documents online on how to do it. I'll see if I can compile this list of URLS for you).
    3. support the EJB projects: MyEJBProject1 (some EJB project that connects to some specific to your back-end database project)
    4. support another Service EJB project: MyExtServiceProject1 (as another project EJB that uses data from an external source)
    5. some WebService project: SalesCreditCardValidationWebService (some WebService project to be deployed as. WAR file that performs a service).

    Try to apply the Concepts of SOA for each Service your application needs. Instead of putting all the EJBs and everying in one giant project, try to split their need logically commercial/sage and geenrate separate projects so that they can maintain as it is to other projects and other applications.

    Anyway, coming back, in the example above, you should have deployment just 2: 1 is the JAR file of SCA in the Workflow and another complete of the EAR file.
    (a) for the workflow project, right-click and generate a deployment profile to deploy all the workflow and NOT on the other projects of the user interface.
    (b) for each project individual genereate a profile of deployment such as MyEJBProj1, MyEJBProj2, MyWebService1, etc etc.
    (c) for TaskForms project, generate a deployment as SalesTaskForms profile. It is a WAR file.
    (d) at the level of the Application, create a new profile of deployment of the EAR type and now assemble all the projects in this EAR, with the exception of the Workflow project.

    First of all, you deploy file JAR of SCA of the Workflow. You need to redeploy this again only when you make changes to the workflow, humantasks etc etc.
    Deploy the full blown EAR file that has all the stuff (EJB JARs, TaskForm WARs, WebService wars etc.).

    At any time, you change your code taskforms or redeploy a java, ejb, EAR file.

    You should have a POT and an EAR to deploy at the end of the day. Infact this is how it should go into UAT, and production. They may not have many pots, multiple wars deployed. The reason why we have separated Workflow SCA Jar file is, because the workflow will not change frequently. And also older versions of SOA/BPM (before 11.5 FP) have a huge disadvantage. Whenever we deploy a workflow project, it will make existing processes VITIATED, unless you deploy a different version. This isn't a problem anymore for 11.5 + FP (Feature Pack applied). Therefore, be careful when you redeploy workflow project.

    Thank you
    Ravi Jegga

  • Problem connecting to a certain router with several routers in the region

    I'm in an apartment complex that uses wireless internet. Accordingly, there is a configuration of multiple routers around the complex. Some work to channel 11, some on channel 1. One of these routers on channel 11 is in my room.

    I use the Linksys WUSB54GC wireless adapter.

    My problem is that my adapter picks up about 4 at most of these various neighboring routers, including the one in my room. However, even if I select it, my card does never connect to the router in my room which is located on channel 11, nor the other 11 channel picks it up sometimes. Still, it will connect to one of the channel 1. It's a problem because all routers outside the bedroom vary in intensity of the signal wildly resulting in me are deteriorerait internet performance and sometimes the connection dropping out entirely.

    Is it possible for me to force my wireless adapter to use the router in my room?

    Go to your control panel, and network connections open, right click on wireless network connection and click Properties. Now on this window, click on the second tab "Wireless network" and remove all the preferred networks. Now try to connect.

  • Error exporting in the level of query with several conditions

    When I run the following query to export with the result.



    C:\Documents and Settings\ITL > exp scott/tiger@orcl tables = (emp) QUERY = "" WHERE deptno > 10 and sal! 2850 = "' LOG = log011.log FILE = exp.dmp"

    Export: Release 10.2.0.1.0 - Production on Wed Jan 30 10:01:27 2013

    Copyright (c) 1982, 2005, Oracle. All rights reserved.


    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With partitioning, OLAP and Data Mining options
    Export performed WE8MSWIN1252 and AL16UTF16 NCHAR character set

    About to export specified tables by conventional means...
    . . export the rows in the table EMP 10 exported
    EXP-00091: exporting more than questionable statistics.
    EXP-00091: exporting more than questionable statistics.
    Export completed successfully with warnings.



    But when I run it with the following condition, then it displays the following error...




    C:\Documents and Settings\ITL > exp scott/tiger@orcl tables = (emp) QUERY ='"WHERE deptno > 10 and work!" = 'CLERK' ' ' LOG = log011.log FILE = Exp01.dmp.
    LRM-00111: no closing quote for value 'LOG = log01'

    EXP-00019: failure of the treatment of parameters, type 'HELP EXP = Y' help
    EXP-00000: export completed unsuccessfully


    C:\Documents and Settings\ITL > exp scott/tiger@orcl tables = (emp) QUERY = "WHERE deptno > 10 and work! = 'CLERK' ' LOG = log5.log FILE = exp01.dmp
    LRM-00112: multiple values not allowed for the parameter "query".

    EXP-00019: failure of the treatment of parameters, type 'HELP EXP = Y' help
    EXP-00000: export completed unsuccessfully


    Please suggest a solution for this.

    Hello

    Single quotes used for CLERKS are very probably the origin of the problem.
    C:\Documents and Settings\ITL > exp scott/tiger@orcl tables = (emp) QUERY ='"WHERE deptno 10 > and job!" = 'CLERK' ' ' LOG = log011.log FILE = Exp01.dmp.

    try to replace this
    C:\Documents and Settings\ITL > exp scott/tiger@orcl tables = (emp) QUERY ='"WHERE deptno 10 > and job!" = "REGISTRAR" "' LOG = log011.log FILE = Exp01.dmp.

    Two single quotes (no quotes) to place an apostrophe for CLERK.

    Thank you
    Padma...

  • Index and MATCH with several conditions

    Hi all! I hope I can explain what I'm trying to do here clearly. This is my first shot:

    In the table below "Office entry Worksheet - area 1" I am trying to insert a formula in column B which will result in an answer ' true / false ' and be used for conditional highlighting

    The first condition that must be met is that the checkbox in the table "Labor and material Checklist" column A or check, if it is not checked, then move to the next line. If the box is checked, then the following condition would need to index and match with column C of table "Office entry Worksheet - area 1" in column B. If there is a match in column C, then move to the next line of column B in the table 'labor and material Checklist '. This continues until there is a 'match', then highlight column B in the table "entry Office sheet - surface 1" in red (or something like "MISSING task")

    It is an estimate and the idea is to ensure that the Phases that are checked in the table "Labor and material Checklist" will not miss when you use the table "entry office map - zone 1".

    Thank you very much for your help!

    Tim

    Is it possible that I can download this spreadsheet file?

  • several curves with several ladders on the same graph

    Hello

    I am currently working on a project that include an acquisition of data VI. I want to display two curves with two different scales (0 to 1 and 0 to 200) on the same graph.

    I tried almost all the options in the Properties menu, I can't find something that fits what I want.

    Do you know how to do such a thing?

    Thanks in advance,

    Gabriel.

    Right-click on the existing scale and click on duplicate.

    EDIT: I would add that you need to set ActYScl via a property node to switch between the scales of the difference if you want to perform operations on them.

  • Video recorded with digital camera includes the text

    All the videos that I download from camera screen "Current Frame", "CPU load", "Output size" and "Size of entry". Help me get rid of it?

    After recording a video from my digital camera and then download it, while I watch the video, there are words anywhere in the entire video.

    Saying:

    The current image: 27 (* just a bunch of numbers, running up to and upwards and upwards)
    CPU load: 26% (* any percentage, running up to and upwards and upwards)
    Entrance Dimensions: 320 x 240
    Format: 320 x 240

    -What this means and how do I get rid of him? I can't even burn these videos on a DVD without him appearing on the disc.

    Is the camera, with that I use to download videos my camera digital; Sony Cyber-Shot. Model DSC-S730

    Hello
     
    1. have you had this problem since the first time you connect your Sony Cyber-Shot. Model DSC-S730 to Windows 7?
    2. on what application you are trying to watch the recorded video?
     
    Issue seems to be with the camera.
     
    Contact Sony because I think they are the best people to offer assistance in this regard.
     
    Aziz Nadeem - Microsoft Support

    [If this post was helpful, please click the button "Vote as helpful" (green triangle). If it can help solve your problem, click on the button 'Propose as answer' or 'mark as answer '. [By proposing / marking a post as answer or useful you help others find the answer more quickly.]

  • Dynamic with several Conditions when action

    APEX 4.2 on XE

    Hi all, I'm trying to create a dynamic Action based on several when conditions... The docs seem to indicate you can do, but I can't seem to trigger.

    Basically I have a DA

    Event: change

    Selection type: item (s)

    Article (s): P42_NEW_REC, P42_STATUS_ID

    Condition: equality

    Value N, 43

    Individually, these trigger very well, but does not fire? Is it possible to have several times conditions? If so, what is the problem with the above.

    Alternatively, if not, if someone could give better advice to achieve the same thing, Id be grateful...

    Rgds

    Richard

    Hello

    Use the condition list

    Kind regards

    Jari

  • During the closure of 2 windows (with several tabs), restore the system does restore properly the tabs in the window of the second. Is this a bug in the new update / all ideas to fix?

    I regularly use 2 windows with multiple tabs of each and session restore would work to bring them all back, but after this last updated the second window restores correctly, with the first non-visible tab on top (only in the menu drop-down) and now the button add a tab on the left (instead of right). Add a button to the tab is not really as far as concerns the other than it indicates other problems with the tabs in the 2nd window. No no not the 1st tab visible is frustrating, because I can't move or also easily navigate. Also, the tabs on the top of the 2nd window which are visible is no longer have the 'x' to close visible, except when this tab is selected. I'm assuming that it is a problem with the new version/update, since this is the first time I encountered the problem, and I closed and restored Firefox several times to make sure it was a recurring problem and not a one-time problem. Any ideas on how to fix would be welcome (except maybe cramming my tabs on a window or it suck XD).

    Thank you for your help. None of your suggested solutions worked, but having just updated to 10.0.2 seems to have solved the problem.

  • Dock VB043AA (compatible with Elitebook 8470p) - including the power?

    Hello

    There are 2 docks compatible with the p 8470

    90 w (VB041AA) dockside

    a dock of 230w (VB043AA)

    I do not see the real differences when checking the plug:

    http://portal.tugraz.at/portal/page/portal/files/Zid/files/Datenblatt/computing/HP-docking.PDF

    Is it possible to use the power of 90w using the "230w" dock?

    Why is there a difference in power between 2 platforms?

    Thank you very much

    Hello

    230w power must allow the docking of a mobile workstation, these laptops are over powered and therefore need a power supply the higher power.

    230w docking station is required to manage this more load, although physically, it's the same as the 90w, it includes elements that are evaluated for the 230w.

    He is briefly mentioned in the specs of th

    «The HP 90 w Docking Station gives you a Smart adapter 90W high energy performance for your notebook PC.» HP 230W Docking Station gives you a Smart adapter 230W-saving in energy for your PC laptop or Mobile Workstation. These Smart adapters guard against fluctuations in power supply with built-in surge protection.

    You do not mix food because it can lead to an overload.

  • Structure of the matter and structure of the event with a condition of the indicator (boolean)

    Hello

    I read a lot of posts but I can't solve my problem. I would like to set up a business structure and the structure of the event, and the condition to run the code inside is a Boolean indicator, in this case called Wahnelt (screenshot). I know I should use signal value, but I don't know how to implement. Here is the program:

    Any help will be more thankful

    a state machine with timer elapsed...

  • Create several folders with several folders in the rapids

    How can I quickly create several folders with a specific set of folders in each of them?

    for example:
    Folder1-> test1, test2, test3...
    Folder2-> test1, test2, test3...
    Folder3-> test1, test2, test3...
    etc.
    I want to create several folders named specifically with an ID I'll specific, and in each of these cases, I would like to have a set of folders.
    Thank you for your help.

    Hello

    Check out the steps suggested by Steve Winograd and TechHead74 in http://answers.microsoft.com/en-us/windows/forum/windows_xp-files/how-or-can-i-create-numerous-new-folders-instaed/a2a67066-7e97-47b3-aba4-8e8a1a460ca3

    Hope this helps you.

Maybe you are looking for