Index for attributes with boolean expression

hi
in our project we use a XML database to store our data. we have a lot of searches in the DB in the form
//object\[@class="..." and @module="..."\]
thus i created an index for the attributes class and module (node-attribute-equality-string) to improve the performance. this works really well, but I'm still not satisfied with the results. is there a way to create an index that handles both attributes at once (instead of two indexes).
another problem, occurs after an insert. when i access the data (via a query like the above), then it goes fast. when i insert another node into the database (that does not even has attributes class or module, so it does not interfere with the index) then the same query as before is slower (by a factor of 3 to 5). when i then reindex manually everything is fast again.
btw. we use a node container
greets
Edited by: user11787357 on Aug 13, 2009 4:35 AM

user11787357 wrote:
//object\[@class="..." and @module="..."\]
thus i created an index for the attributes class and module (node-attribute-equality-string) to improve the performance. this works really well, but I'm still not satisfied with the results. is there a way to create an index that handles both attributes at once (instead of two indexes). Add an attribute to your document that combines @class and @module. This @class-module attribute needs a delimiter to seperate the two parts, some string that may not be found in either valuespace. Simply create an index on that attribute. You can use XQuery to update your documents in the database, or maybe XSLT or SAX or BDB XML XmlReader/XmlWriter as a preprocessing step.
another problem, occurs after an insert. when i access the data (via a query like the above), then it goes fast. when i insert another node into the database (that does not even has attributes class or module, so it does not interfere with the index) then the same query as before is slower (by a factor of 3 to 5). when i then reindex manually everything is fast again.
btw. we use a node containerWhich version and patch level? There have been various patches floating about this forum, some of them related to indexing. I've lost track of them. It would be good to see a Consolidated Patch 2 (CP2) for 2.4.16 even though 2.5 seems not too far away.
Michael Ludwig

Similar Messages

  • Iam unable to create an attribute  with EL expression even i rtrexpr=true

    HI
    I have written one custom tag. For that one attirbute i delcared rtexpr=true in TLD file. but it is not evaluation the EL expression. can any one plz help.it is treating like static text. <orig:StringReplace name="${result.introducerName}" insertString="<br>" replaceAt="15"/>

    If you have a JSP1.2 container, then rtexpr is irrelevant. It should probably be false, so that you don't try to use <%= expr %> with it.
    The responsibility for evaluating the expression lies with your tag.
    Therefore the attribute should be read as a string only,
    Your tag then has to evaluate the EL expression.
    How are you doing that?
    What does it return?
    What does <c:out value="${result.introducerName}"/> give you?
    Probably the issue is somewhere in your custom tag code.

  • Airport Extreme (n-version) as base for extending with Airport Express(old)

    I have a new Airport Extreme that I need to extend - meaning need an ethernet connection on the other side of the room, but I dont want to drag a wire across. I have an extra, and old, Express but I have spent the past couple of hours trying to get it to share/extend the network. Everything seems to configure properly (and I have tried all sorts of options - even setting up a WDS which doesnt seem to work), but when I plug in to the ethernet jack - and then this to my computer - it does not see anything. Help?

    You'll need to check a few settings on the AirPort Extreme because you'll need the information to configure the AirPort Express correctly.
    Open AirPort Utility and click Manual Setup for the AirPort Extreme
    Click the Wireless tab located just below the row of icons
    Jot down the exact name of your wireless network and the security setting that you have in place now. I assume that you already know your wireless network password.
    Close AirPort Utility
    "Hard reset" the AirPort Express (AX) by holding in the reset button on the AX until you see the amber light begin to flash more quickly, keep holding the reset button when this occurs for another 4-5 seconds and then release
    Connect the AX to one of the LAN <-> ports with the ethernet cable
    Open AirPort Utility and click Manual Setup for the AX. You'll be prompted to Switch networks so that you can configure the AX
    Click the Base Station tab (located under the row of icons) to name your AX, establish a device password and adjust Time Zone settings
    Click the Wireless tab
    Wireless Mode = Create a wireless network
    Wireless Network Name = Exact same name as your AirPort Extreme wireless network
    Radio Mode = 802.11 b/g
    Channel = Automatic
    Wireless Security = Exact same setting as your AirPort Extreme network
    Wireless Password = Same password as your AirPort Extreme network
    Confirm Password
    Click the Internet icon and check these main settings
    Connect Using = Ethernet
    Connection Sharing = Off (Bridge Mode0
    Update to save settings. Close AirPort Utility as soon as you see the message that the settings have been stored. The AX will restart in 30-40 seconds. Then restart your entire network by powering everything down. Wait a moment and start the modem first, then the AirPort Extreme, then the AirPort Express and your computers and devices.
    If you decide to use the powerline adapter to allow the AX to be located wherever you want, the AX is already configured to so so.
    Message was edited by: Bob Timmons

  • Where to locate HTTP Server for use with Oracle Express 10g and Apex?

    Hello,
    Im a newbie and I downloaded oracle express 10g and Apex 3.2.1. The Apex install is referencing "choosing a HTTP Server" specifically "Oracle HTTP Server and mod_plsql and the embedded PL/SQL Gateway". My question is do the HTTP server or PL SQL embedded Gateway come with the 10g install or do I need to download them seperately? If so where can I locate them?
    Thank you!

    user12027813 wrote:
    If using Oracle XE, then which APEX install scenario would I used if I downloaded both the XE and apex from the OTN?Oracle XE includes APEX 2.1 and uses the PL/SQL Gateway for HTTP service work. No separate HTTP Server is required.
    If, after you install XE, you want to upgrade to APEX 3.x, you would select the PL/SQL Gateway for the upgrade.
    If the PL/SQL Gateway (EPG) does not provide the full set of services you need, you could put a regular Apache in front and redirect to APEX for those specific issues.
    If that is to complicated, then you could license Oracle Application Server Standard Edition 1 (for a fee) to get an Oracle HTTP Server and it's mod_plsql to replace the internal EPG.

  • Need Help with Boolean expressions

    I wrote this code to convert from base16 to base10:
    int intValue = Integer.parseInt(hex, 16);
    my issue is i wanna a write a code that if an input of "1heg5" would print out a message saying entered wrong code.

    This is just a quick one i did. my problem is that whenever i type 1 it goes straight away to catch statement. this is what happens:
    1. Entre a digit
    2. Exit
    1 or 2: 1
    Enter a digit: Wrong digit
    import java.util.*;
    public class stuff
    public static void main(String[] args)
    Scanner kb = new Scanner(System.in);
    System.out.println("1. Entre a digit");
    System.out.println("2. Exit");
    System.out.print("1 or 2: ");
    int input = kb.nextInt();
    if (input == 1)
    System.out.print("Enter a digit: ");
    try
    String digit1 = kb.nextLine();
    int digit2 = Integer.parseInt(digit1, 16);
    System.out.println("Your answer is: "+digit2);
    catch(Exception e)
    System.out.println("Wrong digit");
    else
    System.exit(0);
    Message was edited by:
    IH82BU
    Message was edited by:
    IH82BU

  • Errors trying to apply a Boolean expression for conditional text

    I have been trying to create some Boolean expressions to filter conditional text, with mixed results. The Boolean expression is three conditions separated by ORs followed by four conditions preceded by AND NOTs. When I apply the expression, FrameMaker exhibits and error and has to quit. The numbers in the error message are:
    9004, 4908044, 6134440, 5459515
    The hidden log file appears to be nothing more than a stack dump.
    Do the numbers listed above indicate anything?
    Are there any known limitations on how long a Boolean expression can or should be? One expression with one fewer OR worked.
    Does there need to be a space between an AND and a NOT? The builder does add one, so I assume it is not necessary.
    Does anyone have some general rules of thumb when working with Boolean expressions for conditional text?
    Thanks,
    Van

    Van,
    The error values are meaningless to users. However, please do send the logfiles to the [email protected] address.
    As far as conditionals go, the general rules are that conditon names must be quoted and that if your ar using the NOT, it must run together with the AND or OR, e.g. ANDNOT ORNOT.
    There's an articel in the Developer Connection on using the boolean operators at http://www.adobe.com/devnet/framemaker/articles/fm8_single_sourcing.html
    Perhaps if you posted the condition that caused the crash, someone might be able to spot an error.

  • Pl/sql boolean expression short circuit behavior and the 10g optimizer

    Oracle documents that a PL/SQL IF condition such as
    IF p OR q
    will always short circuit if p is TRUE. The documents confirm that this is also true for CASE and for COALESCE and DECODE (although DECODE is not available in PL/SQL).
    Charles Wetherell, in his paper "Freedom, Order and PL/SQL Optimization," (available on OTN) says that "For most operators, operands may be evaluated in any order. There are some operators (OR, AND, IN, CASE, and so on) which enforce some order of evaluation on their operands."
    My questions:
    (1) In his list of "operators that enforce some order of evaluation," what does "and so on" include?
    (2) Is short circuit evaluation ALWAYS used with Boolean expressions in PL/SQL, even when they the expression is outside one of these statements? For example:
    boolvariable := p OR q;
    Or:
    CALL foo(p or q);

    This is a very interesting paper. To attempt to answer your questions:-
    1) I suppose BETWEEN would be included in the "and so on" list.
    2) I've tried to come up with a reasonably simple means of investigating this below. What I'm attempting to do it to run a series of evaluations and record everything that is evaluated. To do this, I have a simple package (PKG) that has two functions (F1 and F2), both returning a constant (0 and 1, respectively). These functions are "naughty" in that they write the fact they have been called to a table (T). First the simple code.
    SQL> CREATE TABLE t( c1 VARCHAR2(30), c2 VARCHAR2(30) );
    Table created.
    SQL>
    SQL> CREATE OR REPLACE PACKAGE pkg AS
      2     FUNCTION f1( p IN VARCHAR2 ) RETURN NUMBER;
      3     FUNCTION f2( p IN VARCHAR2 ) RETURN NUMBER;
      4  END pkg;
      5  /
    Package created.
    SQL>
    SQL> CREATE OR REPLACE PACKAGE BODY pkg AS
      2 
      3     PROCEDURE ins( p1 IN VARCHAR2, p2 IN VARCHAR2 ) IS
      4        PRAGMA autonomous_transaction;
      5     BEGIN
      6        INSERT INTO t( c1, c2 ) VALUES( p1, p2 );
      7        COMMIT;
      8     END ins;
      9 
    10     FUNCTION f1( p IN VARCHAR2 ) RETURN NUMBER IS
    11     BEGIN
    12        ins( p, 'F1' );
    13        RETURN 0;
    14     END f1;
    15 
    16     FUNCTION f2( p IN VARCHAR2 ) RETURN NUMBER IS
    17     BEGIN
    18        ins( p, 'F2' );
    19        RETURN 1;
    20     END f2;
    21 
    22  END pkg;
    23  /
    Package body created.Now to demonstrate how CASE and COALESCE short-circuits further evaluations whereas NVL doesn't, we can run a simple SQL statement and look at what we recorded in T after.
    SQL> SELECT SUM(
      2           CASE
      3              WHEN pkg.f1('CASE') = 0
      4              OR   pkg.f2('CASE') = 1
      5              THEN 0
      6              ELSE 1
      7           END
      8           ) AS just_a_number_1
      9  ,      SUM(
    10           NVL( pkg.f1('NVL'), pkg.f2('NVL') )
    11           ) AS just_a_number_2
    12  ,      SUM(
    13           COALESCE(
    14             pkg.f1('COALESCE'),
    15             pkg.f2('COALESCE'))
    16           ) AS just_a_number_3
    17  FROM    user_objects;
    JUST_A_NUMBER_1 JUST_A_NUMBER_2 JUST_A_NUMBER_3
                  0               0               0
    SQL>
    SQL> SELECT c1, c2, count(*)
      2  FROM   t
      3  GROUP  BY
      4         c1, c2;
    C1                             C2                               COUNT(*)
    NVL                            F1                                     41
    NVL                            F2                                     41
    CASE                           F1                                     41
    COALESCE                       F1                                     41We can see that NVL executes both functions even though the first parameter (F1) is never NULL. To see what happens in PL/SQL, I set up the following procedure. In 100 iterations of a loop, this will test both of your queries ( 1) IF ..OR.. and 2) bool := (... OR ...) ).
    SQL> CREATE OR REPLACE PROCEDURE bool_order ( rc OUT SYS_REFCURSOR ) AS
      2 
      3     PROCEDURE take_a_bool( b IN BOOLEAN ) IS
      4     BEGIN
      5        NULL;
      6     END take_a_bool;
      7 
      8  BEGIN
      9 
    10     FOR i IN 1 .. 100 LOOP
    11 
    12        IF pkg.f1('ANON_LOOP') = 0
    13        OR pkg.f2('ANON_LOOP') = 1
    14        THEN
    15           take_a_bool(
    16              pkg.f1('TAKE_A_BOOL') = 0 OR pkg.f2('TAKE_A_BOOL') = 1
    17              );
    18        END IF;
    19 
    20     END LOOP;
    21 
    22     OPEN rc FOR SELECT c1, c2, COUNT(*) AS c3
    23                 FROM   t
    24                 GROUP  BY
    25                        c1, c2;
    26 
    27  END bool_order;
    28  /
    Procedure created.Now to test it...
    SQL> TRUNCATE TABLE t;
    Table truncated.
    SQL>
    SQL> var rc refcursor;
    SQL> set autoprint on
    SQL>
    SQL> exec bool_order(:rc);
    PL/SQL procedure successfully completed.
    C1                             C2                                     C3
    ANON_LOOP                      F1                                    100
    TAKE_A_BOOL                    F1                                    100
    SQL> ALTER SESSION SET PLSQL_OPTIMIZE_LEVEL=0;
    Session altered.
    SQL> exec bool_order(:rc);
    PL/SQL procedure successfully completed.
    C1                             C2                                     C3
    ANON_LOOP                      F1                                    200
    TAKE_A_BOOL                    F1                                    200The above shows that the short-circuiting occurs as documented, under the maximum and minimum optimisation levels ( 10g-specific ). The F2 function is never called. What we have NOT seen, however, is PL/SQL exploiting the freedom to re-order these expressions, presumably because on such a simple example, there is no clear benefit to doing so. And I can verify that switching the order of the calls to F1 and F2 around yields the results in favour of F2 as expected.
    Regards
    Adrian

  • Check box with Boolean data type is not behaving properly

    Hi,
    I create a sample application with one entity driven view object with two attributes. One is of String data type [Value will be Y/N] and another (transient) attribute with Boolean data type. I planned to bind this boolean data type attribute to UI. I overridded the view row impl class and included setting of boolean attribute inside the setter of String attribute. Also in the getter of boolean attribute, added code to check the string attribute and return true/false based on that. Everything is working fine in application module tester. But when i test the same in view controller project in a page, it is not working. Always Check box component is not checked eventhough when i explicitly check it.
    [NOTE: I have given the control hint of Boolean attribute as check_box. Also i don't want selected/unselected entries in the page def file. That's why followed this approach]
    Have i missed out anything? Why this behaviour.
    Thanks in advance.
    Raguraman

    what is the value that is going in when u check it.. did u debug it.. is the viewRowimps setter and getter getting called.. and is it having the right value set and got.. and ur sure that ur using selectBooleanCheckBox..
    ur binding the checkbox to the transient value right??

  • Creating index for a big table

    Hello,
    We have Oracle 9.2
    I have two tables TableA and TableB. TableB is created by copying part of the content of TableA. Inorder to speed up the coping process, I dropped the primary index of TableB. Now TableB has 94 million records.
    Now I was trying to create the primary index for TableB with the following script:
    CREATE UNIQUE INDEX USR3."TableB~0"
    ON USR3.TableB(ID,COUNTER)
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    TABLESPACE INDEX1
    STORAGE(FREELISTS 1
    FREELIST GROUPS 1
    BUFFER_POOL DEFAULT)
    LOGGING
    NOPARALLEL
    NOCOMPRESS
    And I get the Oracle catch all error (ora-00600: internal error....)
    And I only have the following error message: "kcbvmap: unable to find victim buffer"
    The tablespace is a locally managed tablespace
    Please help, how do I fix this problem.

    CREATE UNIQUE INDEX USR3."TableB~0"
    What's with the wacky name?

  • Creating index for standard SAP tables

    Hi!
    What are the advantages and disadvantages of creating addtional indexes for tables with massive amount of data (BSEG, BKPF, COEP, etc...).
    If I create a new index it supposed to make the table access faster, for the cost of hard disk space.
    Am I right?
    Thank you
    Tamá

    Hi,
    Primary and secondary indexes
    Index: Technical key of a database table.
    Primary index: The primary index contains the key fields of the table and a pointer to the non-key fields of the table. The primary index is created automatically when the table is created in the database.
    Secondary index: Additional indexes could be created considering the most frequently accessed dimensions of the table.
    Structure of an Index
    An index can be used to speed up the selection of data records from a table.
    An index can be considered to be a copy of a database table reduced to certain fields. The data is stored in sorted form in this copy. This sorting permits fast access to the records of the table (for example using a binary search). Not all of the fields of the table are contained in the index. The index also contains a pointer from the index entry to the corresponding table entry to permit all the field contents to be read.
    When creating indexes, please note that:
    An index can only be used up to the last specified field in the selection! The fields which are specified in the WHERE clause for a large number of selections should be in the first position.
    Only those fields whose values significantly restrict the amount of data are meaningful in an index.
    When you change a data record of a table, you must adjust the index sorting. Tables whose contents are frequently changed therefore should not have too many indexes.
    Make sure that the indexes on a table are as disjunctive as possible.
    (That is they should contain as few fields in common as possible. If two indexes on a table have a large number of common fields, this could make it more difficult for the optimizer to choose the most selective index.)
    Accessing tables using Indexes
    The database optimizer decides which index on the table should be used by the database to access data records.
    You must distinguish between the primary index and secondary indexes of a table. The primary index contains the key fields of the table. The primary index is automatically created in the database when the table is activated. If a large table is frequently accessed such that it is not possible to apply primary index sorting, you should create secondary indexes for the table.
    The indexes on a table have a three-character index ID. '0' is reserved for the primary index. Customers can create their own indexes on SAP tables; their IDs must begin with Y or Z.
    If the index fields have key function, i.e. they already uniquely identify each record of the table, an index can be called a unique index. This ensures that there are no duplicate index fields in the database.
    When you define a secondary index in the ABAP Dictionary, you can specify whether it should be created on the database when it is activated. Some indexes only result in a gain in performance for certain database systems. You can therefore specify a list of database systems when you define an index. The index is then only created on the specified database systems when activated
    Thanks and Regards
    Arun Joseph

  • Attribute Change Run aborted with an error :Not all data indexed for index

    Hi,
    I have an issue where the master data Attribute Change Run  aborted with an error pointing to the BWA:
    Attribute Change Run aborted with an error :Not all data indexed for index
    we tried to load only 0 data into it,the error still occured.

    Detail message is following:
    not all data was indexed for index 'GBP_BIC:XYCH_098('0' for '114')
    creation of The BIA INDEX for infocube 'YBC_SD015' terminated while filling

  • Search MessageSelector sample for complex boolean express with AND, OR, NOT

    As far as I know I can specify in the "Message Selector" field of a JMS-PartnerLink
    a boolean expression.
    How are AND, OR and NOT written here? Can I use brackets?
    Can I use blanks inside the boolean expression?
    Assume I would like to specify:
    ((myfield1 > 3.0) && (myfield2 == 777)) || (myfield3 != 'aaa')
    Is the syntax correct for this?

    http://www.mcs.csueastbay.edu/support/oracle/doc/10.2/server.102/b14257/jm_create.htm
    11.3 JMS Point-to-Point Model Features/MessageSelector
    that will give you some examples of how to use it

  • Create and save boolean expressions for later evaluation

    Is it possible to create Boolean expressions by inputs via user interface in LabVIEW and save them for later evaluation? I am interested in creating a 'flexible policy engine' which involves creating 'rules' comprising attribute values of certain attributes of objects based on boolean expressions which can later be used for arriving at some decisions based on the 'rules'.

    Hi Belur,
    Have you considered building a script based on the boolean expressions that you want to create for the flexible policy and saving the script to file?
    Later, you can read the script and depending on the policy, it can re-create the boolean expressions.
    A simple way to implement this is by having various pre-defined expressions places into a Case Statement. The script calls the appropriate cases that create the complete expression.
    You can store the attributes of the objects and when the vi is running, it can first open the initialization file, read the attributes and set them.
    For instance, you can read from and write to Property (and Invoke Nodes) to which you can the attributes.
    Unfortunately, I don't have an example of this that I c
    an share with you. There may be some if you do a search.
    Hope this helps..
    JLV

  • Regular expressions with boolean connectives (AND, OR, NOT) in Java?

    I'd like to use regular expression patterns that are made up of simple regex patterns connected via AND, OR, or NOT operators, in order to do some keyword-style pattern matching.
    A pattern could look like this:
    (.*Is there.*) && (.*library.*) && !((.*badword.*) || (^$))
    Is there any Java regex library that allows these operators?
    I know that in principle these operators should be available, since Regular languages are closed under union, intersection, and complement.

    AND is implicit,
    xy -- means x AND yThat's not what I need, though, since this is just
    concatenation of a regex.
    Thus, /xy/ would not match the string "a y a x",
    because y precedes x.So it has to contain both x and y, but they could be
    in any order?
    You can't do that easily or generally.
    "x.*y|y.*x" wouldll work here, but obviously
    it will get ugly factorially fast as you add more
    terms.You got that right: AND means the regex operands can appear in any order.
    That's why I'm looking for some regex library that does all this ugly work for me. Again, from a theoretical point of view, it IS possible to express the described semantics of AND with regular expressions, although they will get rather obfuscated.
    Unless somebody has done something similar in java (e.g., for C++, there's Ragel: http://www.cs.queensu.ca/~thurston/ragel/) , I will probably use some finite-state-machine libraries and compile the complex regex's into automata (which can be minimized using well-defined operations on FSMs).
    >
    You'd probably just be better off doing multiple
    calls to matches() or whatever. Yes, that's another possibility, do the boolean operators in Java itself.
    Of course, if you
    really are just looking for literals, then you can
    just use str.contains(a) && !str.contains(b) &&
    (str.contains(c) || str.contains(d)). You don't
    seem to need regex--at least not from your example.OK, bad example, I do have "real" regexp's in there :)

  • Boolean Expression for PS- Substitution

    Hi,
    I need a help with substitution:
    I need to copy location (PRPS-STORT)  at level-2  WBS element to level 3 &4 WBS elements using substitution. i.e, whatever value of STORT is there at level 2 should be copied to level 3 &4 without manual entry. What Boolean expression can make it possible?
    I am able to define 'Prerequisite' RCJ_PRPSUP-STUFE = '2' AND RCJ_PRPSUP-STORT = 01 and then for 'Sustitution' PRPS-STORT = '01'. This way I can achieve the purpose, if steps are created for each STUFE and STORT separately. But I  guess this is not the right / economical way of doing substitution.
    Any better methods, please ?!!!
    Murali

    Try this:
    Pre-req: Level (PRPS-STUFE) >= '3'
    Substitute: Location Field RCJ_PRPSUP-STORT
    Regards
    Sreenivas

Maybe you are looking for

  • Me and my wife have two iphone4 can we keep one apple id

    can we keep i acct. for both phones yet have difftert app and songs

  • 10.1.3 HumanTask Forms deployment error is it a BUG

    Hi, Any one I am getting the following error. I have installed SOA 10.1.3 Midtier and am using OID as security provider. Now I am trying DocumentReview Sample but am getting the following error: Buildfile: C:\Oracle_Software\1013\soa\bpel\samples\dem

  • Retun navigation flow to a specific Tab

    Hi all, I have the following situation: One page with 2 tabs (Default, Item) on the Item Tab it is possible to select to update one of the items (in a table list) which starts a new flow to an updatePage.jsff. After the update in the record is done (

  • How to do Balance Migration

    Hi All, We have a balance called "Personal Loan Payments" with dimension "Element Entry Inception To Date" which is being feed by element "Personal Loan Payment" through input Value "Pay value". I want to initialize or update the amount of this balan

  • How to AP recon. account  balance transfer to new recon. account

    Hi gurus, I have to transfer old recon. balance to new created recon. account. how can i do this? can anybody help me to work out this issue? Than'x Dhananjay R.