DRG-51030: wildcard query expansion after using @

The following query returns one row:
select * from userinterface where contains (searchtx, 'Mustermann within name and %gmx.de within email')>0;
returns one row.
If I add @ (=> %@gmx.de within email) the following error occurs:
select * from userinterface where contains (searchtx, 'Mustermann within name and %@gmx.de within email')>0;
returns
ERROR at line 1:
ORA-29902: error in executing ODCIIndexStart() routine
ORA-20000: Oracle Text error:
DRG-51030: wildcard query expansion resulted in too many terms
Is the character @ a special character causing the wildcard query expansion? "@gmx.de" is more restictive compared to "gmx.de" (Oracle 10.2.0.4)
select * from userinterface where contains (searchtx, 'Mustermann within name and %de within email')>0;
is also working and returns three rows.

Like Roger said, you could include the @ in your printjoins attribute of your basic_lexer and use a substring_index, then that might allow you to search for '%@gmx.de' and find '[email protected]' without encountering the wildcard expansion error. Increasing the wildcard_maxterms would also make the error less likely. However, I believe that is using Oracle Text in a manner other than it is intended and will cause more problems than it will solve, like increasing the size of your domain index tables by storing substrings and making your searches slower.
If you just leave things the way they are, then @ and . are treated as spaces and '[email protected]' is seen as 'somebody gmx de' and indexed as three separate words, so searching for '@gmx.de' will search for 'gmx de' and will find it, so there is no need for a leading wildcard. If you want to avoid problems with errors due to users entering unnecessary leading wildcards with such special characters, then you can replace them in the string before searching. I usually find it convenient to create a cleanup function and include any such problems, then include that in my code that uses a bind variable for the search string. Please see the example below.
SCOTT@orcl_11gR2> -- table:
SCOTT@orcl_11gR2> create table userinterface
  2    (id       number,
  3       searchtx  xmltype)
  4  /
Table created.
SCOTT@orcl_11gR2> -- lexer:
SCOTT@orcl_11gR2> begin
  2    ctx_ddl.create_preference('german_lexer','basic_lexer');
  3    ctx_ddl.set_attribute('german_lexer','composite','german');
  4    ctx_ddl.set_attribute('german_lexer','mixed_case','yes');
  5    ctx_ddl.set_attribute('german_lexer','alternate_spelling','german');
  6  end;
  7  /
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> -- index:
SCOTT@orcl_11gR2> CREATE INDEX ui_t_ind on userinterface (searchtx)
  2       indextype is ctxsys.context
  3            PARAMETERS ('
  4                 SECTION GROUP ctxsys.auto_section_group
  5                 LEXER        german_lexer
  6                 MEMORY        100000000
  7                 SYNC        (MANUAL)'
  8            )
  9  /
Index created.
SCOTT@orcl_11gR2> -- insert data:
SCOTT@orcl_11gR2> insert /*+ APPEND */ into userinterface (id, searchtx)
  2  values (1, xmltype (
  3  '<?xml version="1.0"?>
  4  <data>
  5    <name>Mustermann</name>
  6    <email>[email protected]</email>
  7  </data>'))
  8  /
1 row created.
SCOTT@orcl_11gR2> insert /*+ APPEND */ into userinterface (id, searchtx)
  2  values (2, xmltype (
  3  '<?xml version="1.0"?>
  4  <data>
  5    <name>Hans Haeberle</name>
  6    <email>[email protected]</email>
  7  </data>'))
  8  /
1 row created.
SCOTT@orcl_11gR2> -- synchronize, then optimize with rebiuld:
SCOTT@orcl_11gR2> begin
  2    ctx_ddl.sync_index ('ui_t_ind');
  3    ctx_ddl.optimize_index ('ui_t_ind', 'rebuild');
  4  end;
  5  /
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> -- what is tokenized, indexed, and searchable:
SCOTT@orcl_11gR2> select token_text from dr$ui_t_ind$i
  2  /
TOKEN_TEXT
DATA
EMAIL
Haeberle
Hans
Häberle
Mann
Muster
Mustermann
NAME
com
de
gmx
somebody
unknown
whatever
15 rows selected.
SCOTT@orcl_11gR2> -- function to clean up search strings:
SCOTT@orcl_11gR2> create or replace function cleanup
  2    (p_string in varchar2)
  3    return         varchar2
  4  as
  5    v_string     varchar2 (100);
  6  begin
  7    v_string := p_string;
  8    v_string := replace (p_string, '%@', ' ');
  9    return v_string;
10  end cleanup;
11  /
Function created.
SCOTT@orcl_11gR2> show errors
No errors.
SCOTT@orcl_11gR2> -- example search strings, queries, and results:
SCOTT@orcl_11gR2> column name  format a15
SCOTT@orcl_11gR2> column email format a20
SCOTT@orcl_11gR2> variable search_string varchar2 (100)
SCOTT@orcl_11gR2> begin
  2    :search_string :=
  3        'Mustermann within name and %@gmx.de within email';
  4  end;
  5  /
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> select id,
  2           extractvalue (u.searchtx, '//name') name,
  3           extractvalue (u.searchtx, '//email') email
  4  from   userinterface u
  5  where  contains (searchtx, cleanup (:search_string)) > 0
  6  /
        ID NAME            EMAIL
         1 Mustermann      [email protected]
1 row selected.
SCOTT@orcl_11gR2> begin
  2    :search_string :=
  3        'Häberle within name and unknown@whatever within email';
  4  end;
  5  /
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> select id,
  2           extractvalue (u.searchtx, '//name') name,
  3           extractvalue (u.searchtx, '//email') email
  4  from   userinterface u
  5  where  contains (searchtx, cleanup (:search_string)) > 0
  6  /
        ID NAME            EMAIL
         2 Hans Haeberle   [email protected]
1 row selected.
SCOTT@orcl_11gR2>

Similar Messages

  • Error - DRG-51030: wildcard query expansion resulted in too many terms

    Hi All,
    My searches against a 100 million company names table on org names often result in the following error:
    DRG-51030: wildcard query expansion resulted in too many terms
    A sample query would be:
    select v.* --xref.external_ref_party_id,v.*
    from xxx_org_search_x_v vwhere 1 =1
    and state_province = 'PA'
    and country = 'US'
    and city = 'BRYN MAWR'
    and catsearch(org_name,'BRYN MAWR AUTO*','CITY=''BRYN MAWR''' ) > 0
    I understand that is caused by the presence of the word Auto to which we append a * . (If i remove the auto the search works fine).
    My question is - is there a way to limit the query expansion to only , say 100, results that get returned from the index?

    Thanks for the reply. This is how the preferences are set:
    exec ctx_ddl.create_preference('STEM_FUZZY_PREF', 'BASIC_WORDLIST');
    exec ctx_ddl.set_attribute('STEM_FUZZY_PREF','FUZZY_MATCH','AUTO');
    exec ctx_ddl.set_attribute('STEM_FUZZY_PREF','FUZZY_SCORE','60');
    exec ctx_ddl.set_attribute('STEM_FUZZY_PREF','FUZZY_NUMRESULTS','100');
    exec ctx_ddl.set_attribute('STEM_FUZZY_PREF','STEMMER','AUTO');
    exec ctx_ddl.set_attribute('STEM_FUZZY_PREF', 'wildcard_maxterms',15000) ;
    exec ctx_ddl.create_preference('LEXTER_PREF', 'BASIC_LEXER');
    exec ctx_ddl.set_attribute('LEXTER_PREF','index_stems', 'ENGLISH');
    exec ctx_ddl.set_attribute('LEXTER_PREF','skipjoins',',''."+-/&');
    exec ctx_ddl.create_preference('xxx_EXT_REF_SEARCH_CTX_PREF', 'BASIC_STORAGE');
    exec ctx_ddl.set_attribute('xxx_EXT_REF_SEARCH_CTX_PREF', 'I_TABLE_CLAUSE','tablespace ICV_TS_CTX_IDX');
    exec ctx_ddl.set_attribute('xxx_EXT_REF_SEARCH_CTX_PREF', 'K_TABLE_CLAUSE','tablespace ICV_TS_CTX_IDX');
    exec ctx_ddl.set_attribute('xxx_EXT_REF_SEARCH_CTX_PREF', 'N_TABLE_CLAUSE','tablespace ICV_TS_CTX_IDX');
    exec ctx_ddl.set_attribute('xxx_EXT_REF_SEARCH_CTX_PREF', 'I_INDEX_CLAUSE','tablespace ICV_TS_CTX_IDX Compress 2');
    exec ctx_ddl.set_attribute('xxx_EXT_REF_SEARCH_CTX_PREF', 'P_TABLE_CLAUSE','tablespace ICV_TS_CTX_IDX ');
    exec ctx_ddl.set_attribute('xxx_EXT_REF_SEARCH_CTX_PREF', 'I_ROWID_INDEX_CLAUSE','tablespace ICV_TS_CTX_IDX ');
    exec ctx_ddl.set_attribute('xxx_EXT_REF_SEARCH_CTX_PREF', 'R_TABLE_CLAUSE','tablespace ICV_TS_CTX_IDX LOB(DATA) STORE AS (CACHE) ');
    exec ctx_ddl.create_index_set('xxx_m_iset');
    exec ctx_ddl.add_index('xxx_m_iset','city, country');
    exec ctx_ddl.add_index('xxx_m_iset','postal_code, country');
    Users will always use city or postal code when searching for a name. When I run this query -
    SELECT dr$token
    FROM DR$XXX_EXT_REF_SEARCH_CTX_I1$I
    where dr$token like 'AUTO%'
    ORDER BY dr$token desc
    i get more than 1M rows.
    is there a way to include and search for the city name along with the org name?
    Thanks again..

  • DRG-51030: wildcard query expansion resulted in too many terms

    Hello,
    I have sql report in my apex application that is based on sql query with oracle text. I am trying to execute query with % parameter: select * from mytable where contains(term, '%')>0
    I now that wildcard_maxterms default maximum is 5000 and in sql-developer query works normally without any errors, but in apex I receive DRG-51030: wildcard query expansion resulted in too many terms.
    Please help!!!

    Hello,
    There's a good discussion of that exception here -
    How to limit the number of search results returned by oracle text
    John
    http://jes.blogs.shellprompt.net
    http://apex-evangelists.com

  • DRG-51030: wildcard query expansion

    Hi,
    encountered an error when I ran this,
    SELECT /*+use_hash(t$oracle_text)*/
    count(documentid)
    FROM t$oracle_text
    WHERE CONTAINS (
    dummy,
    'near(((approv%=underwrit%=report%),(waive%=exception%=override%)),10)',
    1) > 0
    ERROR at line 1:
    ORA-29902: error in executing ODCIIndexStart() routine
    ORA-20000: Oracle Text error:
    DRG-51030: wildcard query expansion resulted in too many terms
    I have few question:
    1) what is this = sign in where clause.
    2)How to get rid of this error .
    3)is there any other alternative to run this without hitting wildcard query expansion limit.
    Thanks,

    Hello,
    There's a good discussion of that exception here -
    How to limit the number of search results returned by oracle text
    John
    http://jes.blogs.shellprompt.net
    http://apex-evangelists.com

  • No Query Result After Using Hierarchy Node Variable (Customer Exit)

    Hi
    I have problem at my query. It doesn't show anything in BEx but when i check the data in BW using tcode LISTCUBE i can display the data.
    This problem happen when i change the restrictions for one of characteristic in filter value.
    The characteristic is custom Infoobject (ZCPARTNER), which like Infoobject Partner Unit.
    Previously I set the restriction with constant value, example : A500,A700,A710,A720,A730,A740 and it worked before.
    But when I change it using hierarchy node variable (customer exit), this problem is arise.
    Here is my code at ZXRSRU01
      WHEN 'ZHIEPART'. --> hierarchy node variable
       BREAK-POINT.
        IF i_step = 2.
        Read from ZZCONSGR information
          LOOP AT i_t_var_range INTO loc_var_range
             WHERE vnam = 'ZZCONSGR' OR vnam = 'ZOCONSGR'. --> read input value from consolidation group variable
            CLEAR l_s_range.
            CLEAR l_s_range-low.
            IF loc_var_range-low EQ '000000000000030000'
               OR loc_var_range-low EQ '000000000000010130'.
              l_s_range-low = 'MEZBUNITMDI'.
              l_s_range-high = '0HIER_NODE'.
            ELSEIF loc_var_range-low EQ '000000000000040000'
               OR loc_var_range-low EQ '000000000000010160'.
              l_s_range-low = 'MEZBUNITMPI'.
              l_s_range-high = '0HIER_NODE'.
            ENDIF.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            APPEND l_s_range TO e_t_range.
            EXIT.
          ENDLOOP.
        ENDIF.
    Here the hierarchy in BW system:
    XXX Cons Unit Hierarchy Set; InfoObject ; Node Name
    - XXX Cons Unit Hierarchy Set; 0HIER_NODE; ZBUNITALL
      - XXX DownStream ... ; OHIER_NODE; MEZBUNITMDI
         - ME/A730; 0CS_UNIT; MEA730
         - ME/A740; 0CS_UNIT; MEA740
      - XXX Power ; OHIER_NODE; MEZBUNITMPI
        - ME A800 - A808; OHIER_NODE; MEZBUNITMPI
        - PT Mitra xxx; 0CS_UNIT;  MEA820
    Anyone can help my problem? Thank you
    Regards,
    Satria B Tandyono

    Hi Satria,
    Instead of following code ---
    CLEAR l_s_range-low.
    IF loc_var_range-low EQ '000000000000030000'
    OR loc_var_range-low EQ '000000000000010130'.
    l_s_range-low = 'MEZBUNITMDI'.
    l_s_range-high = '0HIER_NODE'.
    ELSEIF loc_var_range-low EQ '000000000000040000'
    OR loc_var_range-low EQ '000000000000010160'.
    l_s_range-low = 'MEZBUNITMPI'.
    l_s_range-high = '0HIER_NODE'.
    ENDIF.
    try this ---
    IF loc_var_range-low EQ '000000000000030000'
    OR loc_var_range-low EQ '000000000000010130'.
    l_s_range-low = 'MEZBUNITMDI'.
    ELSEIF loc_var_range-low EQ '000000000000040000'
    OR loc_var_range-low EQ '000000000000010160'.
    l_s_range-low = 'MEZBUNITMPI'.
    ENDIF.
    Note : whenver the option is EQ, the system takes only low value.

  • Difference in query output after using cursor

    can any one help out why the differences are in output, especially the bold and italic ?
    SQL> alter session set cursor_sharing='EXACT';
    Session altered.
    SQL> select '2' from dual;
    2
    SQL> select 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaa' from dual;
    'AAAAAAAAAAAAAAAAAAAAAAAAAAAA
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    SQL> alter session set cursor_sharing='SIMILAR';
    Session altered.
    SQL> select '8' from dual;
    '8'
    8
    SQL> select TRIM('8') from dual;
    TRIM('8')
    8
    SQL> select 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' from dual;
    'BBBBBBBBBBBBBBBBBBBBBBBBBBBBB
    bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
    SQL> select TRIM('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb') from dual;
    TRIM('BBBBBBBBBBBBBBBBBBBBBBBB
    bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
    SQL> select TRIM('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb') from dual;
    TRIM('BBBBBBBBBBBBBBBBBBBBBBBB
    bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb

    oracle support says it best:
    When cursor_sharing = exact,
    we don't convert the literal into binds and hence we know the actual size of the
    format mask. So buffer length is computed and known.
    When cursor_sharing = similar / force, the intention is to reuse the cursor for similar types of statements to avoid re-parsing. So the server converts the literal (format mask) into a bind. At this stage we don't know the actual size of the data, and set buffer length to be maximum, however this affects the display of the column header length in SQLPLUS; not the actual data .

  • Limit number of rows from wildcard expansion- DRG-51030

    We use CONTEXT iindex in 11g to search on a text DB column, "Name".
    This is used in a UI to show autosuggest list of 25 matching names.
    When the end user types an 'a' we want to show a list of the first 25 names that contain an 'a'.
    We hit the issue of too many matches in the wildcard expansion query:
    DRG-51030: wildcard query expansion resulted in too many terms
    This is a frequent use case when the user types just 1 character ('a' will easily match over 50K names in our case).
    Is there a way to make the wildcard expansion query only return the first 25 rows?
    We never show more than 25 names in our UI - so we would like the expansion query to also return max of 25 rows.
    Our query is:
    SELECT ResEO.DISPLAY_NAME,
    ResEO.RESOURCE_ID,
    ResEO.EMAIL
    FROM RESOURCE_VL ResEO
    WHERE CONTAINS (ResEO.DISPLAY_NAME , '%' || :BindName || '%' )>0
    Also,
    Is there a way to use CTXCAT type of index and achieve this (expansion query limit of 25)?
    We are considering switching to CTXCAT index based on documentation that recommends this type of an index for better performance.

    Your best bet may be to look up the words directly in the $I token table.
    If your index is called NAME_INDEX you could do:
    select /* FIRST_ROWS(25) */ token_text from
      (  select token_text
         from dr$name_index$i  
         where token_text like 'A%' )
    where rownum < 26;That should be pretty quick.
    However, if you really want to do %A% - any word which has an A in it - it's not going to be so good, because this will prevent the index being used on the $I table - so it's going to do a full table scan. In this case you really need to think a bit harder about what you're trying to achieve and why. Does it really make any sense to return 25 names which happen to have an A in them? Why not wait until the user has typed a few more characters - 3 perhaps? Or use my technique for one or two letters, then switch over to yours at three characters (or more).
    A couple of notes:
    - Officially, accessing the $I table is not supported, in that it could change in some future version, though it's pretty unlikely.
    - I trust you're using the SUBSTRING_INDEX option if you're doing double truncated searches - a wild card at the beginning and end. If not, your performance is going to be pretty poor.

  • In LR6CC, after using the merge to HDR and the photo returns to LR as a DRG, it is not automatically put into a previously set up stack. For example a stack of three photos. If I use NIK HDR and the photo returns to LR, the stack is automatically changed

    In LR6CC, after using the merge to HDR and the photo returns to LR as a DRG, it is not automatically put into a previously set up stack. For example a stack of three photos. If I use NIK HDR and the photo returns to LR, the stack is automatically changed from 3 to 4. When LR's HDR merge brings a photo back into LR's library, the stack number does not change and the DRG version isn't included in the stack.

    Hi,
    The Ps CS6 public beta version contains the same camera support as found in Ps CS5/5.5 compatible CR 6.6. There will be future updates to CR 7 for Ps CS6 to pick up more camera support. The Nikon D800 NEF files are not supported, yet.
    If you like to work with your D800 files in the public beta build now, you'll have to get the DNG Converter 6.7 from here: http://labs.adobe.com/technologies/cameraraw6-7/
    and convert your files to DNG.
    regards,
    steve

  • How to get the query result of improvement (Before and After ) using sql de

    how to get the query result of improvement (Before and After ) using sql developer.

    Check
    http://www.oracle.com/technetwork/articles/sql/exploring-sql-developer-1637307.html

  • Wildcard Query...Please Help

    I am trying to use a wildcard query but when I complie the end product and do the necessary it does not seem to pull any records back.
    What i have done....
    "SELECT CUSTOMER FROM MYTABLE WHERE CUSTOMER LIKE '"+VAR_CUST+"'" ----This is a variable java side.
    However when i put in a part customer name i would expect the program to return a match of some sort. If i have Bill in the database and query "Bi" i thought bill would come back but nothing is returned. Anyone know why i am returning 0 records?
    I am doing all the necessary after i have run the statement becuase i have converted an existing non wildcard querry which did work so i know its not the process of getting the result to output.
    Thanks in advance

    What database are you using. My normal experience with wildcard characters in SQL is the percent character '%'.
    - Saish

  • Please suggest a select query / sub query with out using any subprograms or

    source table: Three columns ORIGIN, DESTINATION,MILES
    Origin      Destination Miles
    Sydney      Melbourne      1000
    Perth      Adelaide      3000
    Canberra      Melbounre      700
    Melbourne      Sydney           1000
    Brisbane      Sydney           1000
    Perth      Darwin           4000
    Sydney      Brisbane      1000
    out put :Three columns ORIGIN, DESTINATION,MILES
    Duplicate routes are to be ignored so the output is
    Origin      Destination      Miles
    Sydney      Melbourne      1000
    Perth      Adelaide      3000
    Canberra      Melbounre      700
    Brisbane      Sydney           1000
    Perth      Darwin           4000
    Please suggest a select query / sub query with out using any subprograms or functions/pkgs to get the out put table.

    Hi,
    user9368047 wrote:
    ... Please suggest a select query / sub query with out using any subprograms or functions/pkgs to get the out put table.Why? If the most efficient way to get the results you want involves using a function, why wouldn't you use it?
    Here's one way, without any functions:
    SELECT     a.*
    FROM           source_table  a
    LEFT OUTER JOIN      source_table  b  ON   a.origin          = b.destination
                                          AND  a.destination       = b.origin
                          AND  a.miles          = b.miles
    WHERE   b.origin  > a.origin    -- Not b.origin > b.origin
    OR     b.origin  IS NULL
    ;If you'd care to post CREATE TABLE and INSERT statements for your sample data, then I could test this.
    Edited by: Frank Kulash on Nov 6, 2012 7:39 PM
    Corrected WHERE clause after MLVrown (below)

  • Query a table using Multi Select Item

    Hi everyone!
    I got a page where I have this multiselect item, and I want to query a table using its values.
    For example: The Multiselect item has this values: 1,2,3,4,5,6,7,8,9 and 10
    And I want to query every person who has ID_CLASS 1,4,7 and 9 by selecting those IDs from the list, and when I click que Consult button the Report displays those persons.
    Whowever I can't accomplish this, I was trying to find a post about this without success.
    Can anybody help me with this?
    Thanks!!

    Hi,
    This is my problem, I select 2 or more options in the multiple select item, then after I click the "Consult" buttom it submits the page, however only 1 option is highlighted. For example I choose the first two options, then I click Consult and the page is submitted. After that only one of the 2 options are selected, but I need to get the 2 options highlighted as selected items.
    If I clear cache I think I'll lost everything. (selected items)
    Thanks again!

  • SQLDeveloper - application without response after using export menu

    Hello,
    I am using 1.2 newest version with SUN SDK 1.5.09 and XP-Prof (2GB RAM) at 10G.
    After executing the sql-script the result data can not be exported. After using the right-click menu for export to CSV, EXCEL ... SQLDeveloper hangs for quit long time without any activity or resonse within the Task-manager of the OS. I have to quit the task of SQLdeveloper.
    Running short result queries (~25 lines) the export function works fine.
    Is there any parameter to set at startup of the program?
    With best regards
    Martin

    Unfortunately, the running the query again on export bug (which is not dependent on type of export) is not fixed in the current EA1. With tracing on, exporting "select * from <table>" shows the following in the trace file:
    select * from <table>
    Parse x 1, Execute x 1, Fetch x 156 (7778 rows in chunks of 50)
    select * from ( select "COLUMN1","COLUMN2",...,"COLUMNn" from ( select * from <table> ) )
    Parse x 1, Execute x 1, Fetch x 1 (50 rows)
    My guess (from 1.2 experience) is that this second query which only fetches once is run after selecting one of the export options and before the export dialog is displayed. If this first fetch takes five minutes, then there will be a five minute delay after selecting the export option, before the export dialog appearing.

  • Query expansion and FIRST_ROWS problem

    Hello!
    I have the following construction:
    SELECT p.* FROM ( SELECT q.*, rownum rn FROM (
    SELECT /*+ FIRST_ROWS(10) */ SCORE(1) AS score, idf FROM table WHERE CONTAINS(column, **query**, 1) > 0 ORDER BY SCORE(1) DESC, ROWID
    ) q WHERE rownum <= 10) p WHERE rn > 0;
    When I use query:
    <query><textquery lang="ENGLISH" grammar="CONTEXT"><progression>
    <seq>string within section</seq>
    </progression></textquery><score datatype="FLOAT" algorithm="DEFAULT"></query>
    I get the results (>10) in some normal time. But with the following query:
    <query><textquery lang="ENGLISH" grammar="CONTEXT"><progression>
    <seq>string within section</seq>
    <seq>fuzzy(string) within section</seq>
    <seq>%string% within section</seq>
    </progression></textquery><score datatype="FLOAT" algorithm="DEFAULT"></query>
    the search is soooo slow. I don't understand it: I set the limit to 10 first rows, which is already satisfied by the first sequence in the query expansion. But Oracle (obviously) seems to execute all the other ones as well!
    And another observation: the presence of /*+ FIRST_ROWS(10) */ doesn't really matter from the time viewpoint...
    So what I am doing wrong? Thank you SOO much for answers!
    Martin

    Hello!
    I have the following construction:
    SELECT p.* FROM ( SELECT q.*, rownum rn FROM (
    SELECT /*+ FIRST_ROWS(10) */ SCORE(1) AS score, idf FROM table WHERE CONTAINS(column, **query**, 1) > 0 ORDER BY SCORE(1) DESC, ROWID
    ) q WHERE rownum <= 10) p WHERE rn > 0;
    When I use query:
    <query><textquery lang="ENGLISH" grammar="CONTEXT"><progression>
    <seq>string within section</seq>
    </progression></textquery><score datatype="FLOAT" algorithm="DEFAULT"></query>
    I get the results (>10) in some normal time. But with the following query:
    <query><textquery lang="ENGLISH" grammar="CONTEXT"><progression>
    <seq>string within section</seq>
    <seq>fuzzy(string) within section</seq>
    <seq>%string% within section</seq>
    </progression></textquery><score datatype="FLOAT" algorithm="DEFAULT"></query>
    the search is soooo slow. I don't understand it: I set the limit to 10 first rows, which is already satisfied by the first sequence in the query expansion. But Oracle (obviously) seems to execute all the other ones as well!
    And another observation: the presence of /*+ FIRST_ROWS(10) */ doesn't really matter from the time viewpoint...
    So what I am doing wrong? Thank you SOO much for answers!
    Martin

  • Exporting Query Output after expanding manually,

    Hi Experts,
    we have some troubles making work some buttons on one of our queries.
    When trying to export the query information after expanding it manually, we just get the excel and the csv with the first displayed information. I mean we just got the query collapsed as it was initially displayed before expanding.
    Seems to be a rookie problem, but we do not know how to solve it.
    Hope you can help us.
    Regards,
    Roberto

    Hello,
    Currently I'm using a more or less stable combination of SQLPlus, spool-command, html-format and batch-file but I would like to get more stable results, preferrably in xls / csv format.
    If you have only SQL*PLUS, then your options are quite limited. Which part of your combination do you think is "unstable"? Except the HTML format it is a very common stack to generate reports. Other possibilities:
    Re: Create a CSV file
    Re: DBMS result in exel
    For further questions you should open your own thread, preferrably in another forum space -> PL/SQL
    Regards
    Marcus

Maybe you are looking for

  • Error while building xml document

    Hi Everyone, I have a problem while building xml document. I have developed my java files using IBM Eclipse 3.0 and i had no problem while executing the files. But while i am trying to execute the same code in jdk/bin, xml document is not working.. N

  • No Import Library option in iTunes 10

    I just had iTunes throw the "locked library" error on me, and one solution I heard of was moving all db out of the iTunes folder and then re-importing 'iTunes Music Library.xml' into iTunes. According to step 7 in the knowledge base article on Apple'

  • CDM and printing from Client side

    Hi all, Here I have installed RH9 and Tarantella 3.40. and I have 2 network card. First one is eth0 is for LAN and second is for static IP i.e eth1. my application server is win2k and I can access application easily. Now my problem is I want use clie

  • Data Modeler How to display the "relationship name" vertically

    Is there any way to display the relationship name vertically. In Designer, it used to be like that.

  • There is constant flickering or blinking on pages.

    This is so annoying. The web pages flicker or blink especially when the cursor is is passed over the top of the webpage where the toolbar, shortcuts and open tabs are. Sometimes it blinks even if the mouse is not being used. Some suggestions that I h