How to use text based index

Hi,
I want to use a text based index. The problem statement was i have to delete all those records which have column
'ABC%'
means data can be ABC1, ABC2, ABCl, ABCn
so i thought i would do like
delete from tab1
where col1 like 'ABC%'.
There are millions of records.
so i thought of optimizing the Query by using text based index. If my approach is right can you suggest how i can implement it and Is there any other way around?
Thanks
_vinod                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Are you saying that simple b tree index would be used in a qurey where i have used LIKE operator? Yes. Not "would" but certainly "could", as long as wildcard is trailing.
Now whether it "would" depends on whether it's estimated to be the cheapest access path.

Similar Messages

  • How to use ICC based colorspace

    hello,
    The question is how to define a color in ICC based colorspace ?
    I tried with gState.strokeColorSpec.value.color array and it work fine when my CIE based colorspace is CMYK but how to do it when colorspace can be CMYKOG or RGB ... ?
    Regards,
    William

    You can certainly use Cos to create the ICC colorspace (or the alternate) just as you did for the DeviceN.
    Cos is just a wrapper over direct PDF objects – so read the PDF standard for what the objects you need are, then make the relevant calls.
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Thu, 20 Oct 2011 03:03:46 -0700
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: how to use ICC based colorspace
    Re: how to use ICC based colorspace
    created by yokuju<http://forums.adobe.com/people/yokuju> in Acrobat SDK - View the full discussion<http://forums.adobe.com/message/3981410#3981410

  • How to create function based index on REGEXP_LIKE funtion

    Dear Gurus,
    I have below table CDR
    Name Null Type
    STARTTIME NOT NULL DATE
    SUBSCRIBERNUMBER NOT NULL NUMBER
    CALLINGNUMBER NOT NULL VARCHAR2(20)
    CALLEDNUMBER NOT NULL VARCHAR2(20)
    I am regularly firing below query
    SELECT count(*)
    FROM CDR data
    WHERE STARTTIME BETWEEN '01-Jul-2009 00:00:00' and '31-May-2012 23:59:59'
    AND REGEXP_LIKE(data.SUBSCRIBERNUMBER, '^98721[0-9]*[5]+[0-9]*$');
    since there is REGEXP_LIKE is being used, Can I use function based index to improve performance.
    Thanking in advance
    Sanjeev

    Hi,
    you can do it that way :Scott@my11g SQL>create table test (name varchar2(30));
    Table created.
    Scott@my11g SQL>create index myfbi on test(case when regexp_like(name,'^98721[0-9]*[5]+[0-9]*$') then 1 else 0 end);
    Index created.
    Scott@my11g SQL>explain plan for
      2  select * from test where case when regexp_like(name,'^98721[0-9]*[5]+[0-9]*$') then 1 else 0 end = 1;
    Explained.
    Scott@my11g SQL>/
    PLAN_TABLE_OUTPUT
    Plan hash value: 140237472
    | Id  | Operation                   | Name  | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT            |       |     1 |    20 |     1   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| TEST  |     1 |    20 |     1   (0)| 00:00:01 |
    |*  2 |   INDEX RANGE SCAN          | MYFBI |     1 |       |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - access(CASE  WHEN  REGEXP_LIKE ("NAME",'^98721[0-9]*[5]+[0-9]*$')
                  THEN 1 ELSE 0 END =1)
    Note
       - dynamic sampling used for this statement (level=2)
    19 rows selected.

  • How to use text-to-speech so that my text messages are read to me in the car?

    How to use text-to-speech so that my text messages are read to me in the car?

    I have the same question but I have iPhone 5

  • How to use texting on ipad mini?

    I just got my new ipad for Xmas I was wondering how to use the texting on the ipad mini

    You have to set up your iMessage account on it and then you can iMessage other people using iDevices.
    In the Safari browser on your mini there are bookmarks to the users manual.

  • How to use date column index

    Hi,
    Why is that I got different results for my queries?
    Note that emp_date is indexed, so i dont want to use
    a function to it.
    QUERY1(full table scan)
    SELECT COUNT(*) FROM EMP WHERE TRUNC(EMP_DATE)=TRUNC(SYSDATE-30); (RESULT=8,842)
    QUERY2
    SELECT COUNT(*) FROM EMP WHERE
    EMP_DATE >=(SYSDATE-30) and EMP_DATE < (SYSDATE-30); (RESULT=0)
    QUERY3
    SELECT COUNT(*) FROM EMP WHERE
    EMP_DATE BETWEEN TRUNC(SYSDATE-30) and TRUNC(SYSDATE-30); (RESULT=2,100)
    Please help me how to use indexed date column...

    > Why is that I got different results for my queries?
    Because your queries are different.
    1) This one selects all records on 20 october, regardless of their time component
    2) This one selects all records with an emp_date at least being 20 october 14:56:30 AND being smaller than 20 october 14:56:30. No record will ever satisfy this condition.
    3) This one selects all records on 19./20 october at midnight 00:00:00
    Please see this example:
    SQL> create table myemp (emp_date)
      2  as
      3   select trunc(sysdate) - 30 +
      4          case
      5          when level <= 2100 then 0
      6          when level <= 8842 then dbms_random.value(1,86399)/86400
      7          else 2
      8          end
      9     from dual
    10  connect by level <= 100000
    11  /
    Tabel is aangemaakt.
    SQL> create index i1 on myemp(emp_date)
      2  /
    Index is aangemaakt.
    SQL> exec dbms_stats.gather_table_stats(user,'myemp',cascade=>true)
    PL/SQL-procedure is geslaagd.
    SQL> set autotrace on explain
    SQL> select count(*) from myemp where trunc(emp_date)=trunc(sysdate-30)
      2  /
                                  COUNT(*)
                                      8842
    1 rij is geselecteerd.
    Uitvoeringspan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=88 Card=1 Bytes=8)
       1    0   SORT (AGGREGATE)
       2    1     TABLE ACCESS (FULL) OF 'MYEMP' (Cost=88 Card=1000 Bytes=
              8000)
    SQL> select count(*) from myemp where
      2  emp_date >=(sysdate-30) and emp_date < (sysdate-30)
      3  /
                                  COUNT(*)
                                         0
    1 rij is geselecteerd.
    Uitvoeringspan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=2 Card=1 Bytes=8)
       1    0   SORT (AGGREGATE)
       2    1     FILTER
       3    2       INDEX (RANGE SCAN) OF 'I1' (NON-UNIQUE) (Cost=4 Card=2
              50 Bytes=2000)
    SQL> select count(*) from myemp where
      2  emp_date between trunc(sysdate-30) and trunc(sysdate-30)
      3  /
                                  COUNT(*)
                                      2100
    1 rij is geselecteerd.
    Uitvoeringspan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=2 Card=1 Bytes=8)
       1    0   SORT (AGGREGATE)
       2    1     FILTER
       3    2       INDEX (RANGE SCAN) OF 'I1' (NON-UNIQUE) (Cost=4 Card=2
              50 Bytes=2000)
    > Please help me how to use indexed date column...
    Use this query instead:
    SQL> select count(*)
      2    from myemp
      3   where emp_date between trunc(sysdate)-30 and trunc(sysdate)-29 - interval '1' second
      4  /
                                  COUNT(*)
                                      8842
    1 rij is geselecteerd.
    Uitvoeringspan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=2 Card=1 Bytes=8)
       1    0   SORT (AGGREGATE)
       2    1     FILTER
       3    2       INDEX (RANGE SCAN) OF 'I1' (NON-UNIQUE) (Cost=4 Card=2
              50 Bytes=2000)Regards,
    Rob.

  • Using function based index causing connection to abort

    My problem is as below
    I m using oracle 8i data base
    I have a table Dummy with column col1 .
    I have created a function based index on col1
    Now i try to update the table dummy using this function based index (i.e)
    i run the following query
    update dummy set col2='new value' where col1=ltrim(col2,'0')
    now when i execute this statement it causes the connection to abort. It gives the error
    ERROR at line 1:
    ORA-03113: end-of-file on communication channel
    But if i run select query (i.e) select col2 from dummy where col1=ltrim(col2,'0')
    it executes sucessfully.
    Also if i wrap the ltrim over some other function it works (i.e.)
    update dummy set col2='new value' where col1=upper(ltrim(col2,'0'))
    Any thoughts or ideas on what can be the reason...
    plese let me know for any questions,clarifications..
    Thanks in advance...
    Balaji

    Balaji, what is the exact error message returned? Remember to always include all the error details so that the problem can be identified and diagnosed.
    If you mean you are getting an ORA-03113: end-of-file on communication channel, this means that the Oracle Server Process that serviced your client session, crashed.
    In that case you need to refer to the alert log file on the database instance to see the server-side error message that resulted (often an ORA-0600 internal error) and the name of the trace file that was created at a result.
    You also failed to specify the exact Oracle 8i version you are using. Make sure you're on the very last patch set released for 8i - that should be 8.1.7.4 as far as I recall.

  • How to use text boxes or rich text boxes inside loops in array format

     Help me,
        I try to use text boxes load automatically showing the character in the text box.One text box showing one character (ex: " A"). I use 5 text boxes.I try to code using   for loop but i don't know how to use array format.
    Please explain any solution.
    I am using Microsoft Visual Basic 2008 Express Edition

    Hi
    And yet again, this version uses a list of textbox names (IN REQUIRED ORDER) to fill.
    ' this is an overly simplified example
    ' in the form of a Project
    ' start a new Project with a default
    ' Form1 with many TextBoxes.A list of
    ' required textboxes to fill IN THE
    ' REQUIRED ORDER is used.
    ' Copy/paste this code to replace
    ' all Form1 code with this.
    ' NOTE: there is plenty of oppertunity
    ' for exceptions as no exception handling is
    ' included here.
    Option Strict On
    Option Explicit On
    Option Infer Off
    Public Class Form1
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
    Dim tbNames As New List(Of String)
    ' add names IN THE ORDER required
    tbNames.AddRange({"TextBox2", "TextBox5", "TextBox1", "TextBox3", "TextBox4"})
    Dim s As String = "boxes"
    Dim counter As Integer = 0
    For Each name As String In tbNames
    For Each c As Control In Me.Controls
    If c.GetType() Is GetType(TextBox) Then
    If c.Name = name Then
    c.Text = s(counter)
    counter += 1
    End If
    End If
    Next
    Next
    End Sub
    End Class
    Regards Les, Livingston, Scotland

  • How to use Text lements(/E) in Scripts and print program

    Hi all,
    I need to use Text elements from print program to Script output.
    I have included the text element name in WRITE_FORM and defined in the script with (/E) also.
    Still the data is not displaying.
    Please let me know how to use the text elements.
    thanks in advance..
    Rakesh
    <removed_by_moderator>
    Edited by: Julius Bussche on Nov 25, 2008 10:08 AM

    For printing the text directly on the formm the text element in form wud be as
    /E   ITEM_HEADER
    MH Quantity,,,,Description,,UOM,,Net Weight,,Gross Weight
    If you have variable define in the driver prog and you want to display,text elt. wud be as
    /E   ITEM LINE
    MH &CONF_OUT-ATBEZ&,,&CONF_OUT-ATWTB&
    where CONF_OUT is a structure with fields ATBEZ and ATWTB
    MH is the paragraph format
    Hope this clears your doubt.
    Regards,
    Prashant

  • How to use the delta index in TREX?

    We have been using TREX with EP KM for 2 years.
    However we never used the delta index functionality.
    Could you share your experience on how to use delta indexes?
    Thanks!

    Hai,
    Please check the below link.....
    http://help.sap.com/saphelp_nw70/helpdata/EN/d9/0418418291a854e10000000a1550b0/frameset.htm
    Regards,
    Yoganand.V

  • How to use JKS-based Keystore in Oracle SOA 11g

    I am trying to do FTPS on third party remote server(with UNIX OS) using SOA 11g FTP Adapter. I have Installed and Configured vsftpd and generated vsftpd.pem certificate file on remote server.
    Followed the steps mentioned in http://download.oracle.com/docs/cd/E17904_01/integration.1111/e10231/adptr_file.htm#CIABDGCF
    In one of the step "Setting Up the Oracle FTP Adapter" walletLocation is required, then I went through steps mentioned in http://download.oracle.com/docs/cd/E17904_01/core.1111/e10105/wallets.htm#CHDGIJDC
    Tried to use both 1) JKS Keystore Management 2) Wallet Management
    But unable to find both of them in em of Oracle SOA 11g as the steps are not matching.
    Can anyone tell me how to use JKS Keystore Management or Wallet Management ?
    Many Thanks!!
    Regards
    Yogesh

    Hi Yogesh,
    I believe the wallet can be created from the FMW console only if the HTTP server is installed and available. If there is no Oracle HTTP server, please configure one as given under.
    [ http://download.oracle.com/docs/cd/E12839_01/doc.1111/e14260/toc.htm | Oracle HTTP Server Installation ]
    Reards,
    Neeraj Sehgal

  • How to create function based index for TO_CHAR

    i need to create a function based index for the function to_char.when i tried ,i got an error,"only pure function can be indexed".what the error really means, help me in creating the index to reduce my query cost.

    It works fine on my database. version 9iR2
    create index IDX_TO_CHAR on emp(to_char(hiredate,'YYYY-MM-DD HH24:MI:SS'));
    explain plan for
    select hiredate from emp where to_char(hiredate,'YYYY-MM-DD HH24:MI:SS')='1981-05-01 00:00:00';
    | Id  | Operation                   |  Name        | Rows  | Bytes | Cost (%CPU)|
    |   0 | SELECT STATEMENT            |              |     1 |     8 |     2  (50)|
    |   1 |  TABLE ACCESS BY INDEX ROWID| EMP          |     1 |     8 |     2  (50)|
    |*  2 |   INDEX RANGE SCAN          | IDX_TO_CHAR  |     1 |       |     2  (50)|
    Predicate Information (identified by operation id):
       2 - access(TO_CHAR("EMP"."HIREDATE",'YYYY-MM-DD HH24:MI:SS')='1981-05-01 00
                  :00:00')Yours seem like a tuning issue, so why not give us your sql and execution plan and so on.
    maybe there is other ways to tune your sql than creating a function based index?

  • How to use Cost Based Optimizer

    Hi,
    I'm looking for a documentation about CBO, I found some information through google and here but anyone knows where I can found more informaton about CBO, how to use, how i'ts increase the performance and more?
    Thank You

    See Oracle® Database Performance Tuning Guide

  • How to use text in condition master data?

    I want to copy text automaticlly from condition master data to sales order, but it seems impossible.
    How can I reach my purpose?
    In addition, I found it seems impossible to copy text from delivery note to Billing.
    Why and how to realize?

    hi,
    Can u tell me why do u want to copy text , means , do you want to print somewhere ?
    I have one alternate method , just try it,
    Use the Customer master - General data - Control data - Group key  --- where u can freely define any object ,say ABC , the same can be verified in all stages like sales order , delivery and billing as customer is flowing . Based on this object maintain your text in SO10 and call the same through the function ' READ_TEXT ' wherever you want.
    saravanan

  • How to use Edition Based Redefinition in APEX?

    Hello,
    This might be my first question on this forum ;-)
    I am trying to get 11gR2 Edition Based Redefinition to work within APEX. But for testing purposes (before altering the database to use the new edition as the default) I have to set the edition at the session level. But as APEX shares sessions from the pool (I might get another session with every page refresh/call), I need to execute an ALTER SESSION command.
    I can't use EXECUTE IMMEDIATE, 'cause that results in:
    execute immediate 'alter session set edition=HR_RELEASE2';
    ORA-38815 : ALTER SESSION SET EDITION must be a top-level SQL statement
    So is there a way to just run a SQL command at the "start" of a page (request)?
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    Edited by: Roel on Feb 28, 2010 7:00 PM
    - Changed the subject of this post (for an easier search on the forum)

    Hello all,
    Patrick and John were on the right track...
    After contacting Bryn (the Oracle brain behind EBR), there appeared to be a DAD attribute called 'database-edition'. Using this you can change the Edition of a DAD (and via the DAD ... all the users that use that DAD):
    begin
    dbms_epg.set_dad_attribute('APEX', 'database-edition', 'HR_RELEASE2');
    end;The funny thing is that a user doesn't have to re-connect. With the next server roundtrip he will use the other edition!
    Remarkable fact: This setting doesn't effect the Session-Edition, but only the Current-Edition. Have to test how that'll work out when using CrossEdition Triggers...
    Another thing: There seems to be an equivalent for the Apache /HTTP Server.
    You have to add a line to your dads.conf setting for PlsqlDatabaseEdition.
    If I add that line (in my environment) the HTTP Server fails to start with:
    /home/oracle/OraHome_1/Apache/Apache/bin/apachectl start: execing httpd
    Syntax error on line 48 of /home/oracle/OraHome_1/Apache/modplsql/conf/dads.conf:
    Invalid command 'PlsqlDatabaseEdition', perhaps mis-spelled or defined by a module not included in the server configurationApart from that: You have to restart the HTTP Server to use the changed DAD. So that is in opposite of the whole goal of EBR (24 x 7 availability).
    Once I figured it all out I'll write a blog post about it. If somebody has anything to add to this thread, feel free! Especially the HTTP Server/Edition combination would be interesting!
    Greetings,
    Roel
    http://roelhartman.blogspot.com/

Maybe you are looking for

  • Write Down/Depreciation of Material Valuation Class

    Hi, We are trying to write down/depreciate specific valuation types of materials which are purely for operational purposes ie not strictly project stock. Has anyone gone thru an exercise where they have performed such an exercise, for specific materi

  • IDoc Adapter 151 - Transaction aborted

    Hi fellows, after patching our XI-System to SP19 we try to do a new IDoc2File Szenario. We have one from the old XI-Level which runs really good. It's going from external R/3 to our XI server into the file system. the new scenario has some selfmade I

  • DHLore Game crash on startup

    Hi to all I tried to install Dark Horizons game but it crash on startup http://www.garagegames.com/products/29/ ./DHLore.bin: symbol lookup error: ./DHLore.bin: undefined symbol: X11_KeyToUnicode I searched on Google and I found this https://bugs.lau

  • Java virtual machine very slow: why?

    Since I have upgraded Tiger to Leopard, the startup of the Java virtual machine is unbelievably slow: for example, just executing java -version for the first time requires almost one minute. This happens only the first time the JVM is started: after

  • Deployment of IE8 as an update

    Before I begin let me admit that I am not entirely sure if this is right forum for this question I have deployed IE8 as update through SCCM to Windows XP device that have IE7 (really old school I know) However after the installation is complete in th