Is it possible for an index that includes the condition 'GOLD '?

Hello, I have a few questions.

The test was conducted in the following procedure.

################################
create table test
(
VARCHAR2 (10) C1.
C2 varchar2 (10),
key (c1) elementary school

);

create index test_idx1 on test (c2);

Command > explain select * test where c1 = 'JOHN' or c2 = "JOHN";

Query optimizer plan:

STEP: 1
LEVEL: 1
OPERATION: RowLkRangeScan
TABLENAME: TEST
IXNAME: TEST
CONDITION INDEX: < NULL >
NOT INDEXED: TEST. C2 = 'JOHN' OR TEST. C1 = 'LUCY '.

Command >


Command > explain select * test where c1 = 'LUCY' and c2 = "ABDELLAH.

Query optimizer plan:

STEP: 1
LEVEL: 1
OPERATION: RowLkRangeScan
TABLENAME: TEST
IXNAME: TEST
INDEXED CONDITION: TEST. C1 = 'ABDELLAH.
NOT INDEXED: TEST. C2 = "ABDELLAH.

Command >
################################

By adding the status of "GOLD" in this test does not use the index.

Is it possible for an index that includes the condition 'GOLD '?

Thank you.

GooGyum.

A database can generally use indexes in this way for one 'or' with two different columns. However, for this example specific can easily rewrite the query using 'UNION' to use the relevant hints while still giving the same result (correct):

Command > explain select * from t1 test where t1.c1 = 'LUCY' union select * test t2 where t2.c2 = "JOHN";

Query optimizer plan:

STEP: 1

LEVEL: 1

OPERATION: RowLkRangeScan

TABLENAME: TEST

IXNAME: TEST

INDEXED CONDITION: T1. C1 = 'ABDELLAH.

NOT INDEXED:

STEP: 2

LEVEL: 2

OPERATION: RowLkRangeScan

TABLENAME: TEST

IXNAME: TEST_IDX2

INDEXED CONDITION: T2. C2 = "ABDELLAH.

NOT INDEXED:

STEP: 3

LEVEL: 1

OPERATION: OrderBy

TABLE_NAME:

IXNAME:

INDEXED CONDITION:

NOT INDEXED:

STEP: 4

LEVEL: 2

OPERATION: UnionMergeSort

TABLE_NAME:

IXNAME:

INDEXED CONDITION:

NOT INDEXED:

Maybe you can apply something similar? If you know that there is no possibility of duplicate lines then you can optimize it (in terms of performance) by using UNION all.

Chris

Tags: Database

Similar Questions

  • Is it possible for first Pro CC hide the automatic backup window

    Is it possible for first Pro CC hide the automatic backup window, without turning off autosave function?

    When such a device is save you wonder why you wouldn't be able to do everything that is the case in the car.

    I'm guessing you want automatic backup in the background?

  • Web site created by Muse. The greats until tweek of today. Web site insists now for open index.html in the tablet. Don't know how product, nor how to change the default value for pc of office/index.html. Would advise. Bob

    Web site created by Muse. The greats until tweek of today. Web site insists now for open index.html in the tablet. Don't know how product, nor how to change the default value for pc of office/index.html. Would advise. Bob

    Hi Bob

    I think that you have found the solution but if still you are facing the question, please give me the url of the site that opens another provision in the tablet.

    Please make sure desktop redirection is checked in the site properties page layout.

    Thank you

    Sanjit

  • Does anyone know how to change the composition of Adobe Creative cloud AE single app to the student member that includes the creation?

    Does anyone know how to change the composition of Adobe Creative cloud AE single app to the student member that includes the creation?

    Hi Danielle,

    Thanks, I tried to do but unable to communicate with anyone.

    Here you go: Contact customer service

    Thank you

    Kevin

  • Can I create a task that includes the 2 c series modules?

    I am trying to create a single task that includes 2 modules of the series C OR - 9425, but when I wire the constant "Mod3/port0, Mod4/port0" physical channel in the DAQmx create Virtual Channel.vi I get error-200086 which indicates the syntax range physical channel in the input string is not valid because several devices have been included in the chain.  It is my understanding of LabView help this multidevice tasks are allowed.  Also according to article KB http://digital.ni.com/public.nsf/allkb/CF85114C6025C84C862571C000722DDA devices multiple tasks are supported for devices of the series S, series C and DSA devices, and according to this article KB http://digital.ni.com/public.nsf/websearch/78E44565FD87E7D686257108007F94F8?OpenDocument I formatted my constant of physical channel correctly.

    Please can someone explain why I get this error when all indications are that this should be a simple thing to do?

    My C Series modules are in slots 3 and 4 in a chassis cDAQ-9188, I'm currently under LabView 8.5.1, with Windows XP

    Thank you

    Eric

    Hi Eric,.

    I am afraid that you cannot configure the hardware timing with the module 9425 in CompactDAQ. The NI 9425 data sheet explains: «the NI 9425 is a static digital module, so you can use it to perform only call by the software or static operations when installed in a chassis NI CompactDAQ.»

    For I, AO and countertops, daisy chaining multiple calls to DAQmx create channel equivalent to specifying a list of physical channels, but it's different for DIO. Only one virtual channel DIO can contain several physical channels (lines). It would be quite reasonable to assume that by specifying a list of lines 'with a single channel for all lines"would cause DAQmx put all the lines in a single virtual channel, but see how it is implemented under DAQmx, is not possible when the lines are on multiple devices. Also, it would be reasonable to assume that if DAQmx could not put all the lines in a single virtual channel, it would create a virtual ring road, but that is not how it is implemented-, it returns the error you received.

    Instead, here are two approaches to all 64 lines in a single task. Either we have to work.

    Approach: create a single task, containing two virtual channels (MyChan0 and MyChan1). MyChan0 contains cDAQ1Mod3/port0 / line0:31 and MyChan1 contains cDAQ1Mod4/port0 / line0:31. Digital 2D Bool NChan 1Samp read VI returns a 2 x 32 table of Boolean. To flatten it into an array of 64 elements D 1, you must use the table to reshape or some other method.

    The task of DAQmx > ownership of channels is here to show that there are two virtual channels named MyChan0 and MyChan1. Also, I used a loop for to show that you don't have to encode multiple calls to DAQmx Create Channel. The constant "a channel for all lines" is redundant because it is the default value.

    B approach: create a single task, containing 64 virtual channels (MyChan0 through MyChan63). This example uses the constant 'a channel for each line', which is not the default. MyChan0 contains port0/cDAQ1Mod3/$line0, MyChan1 contains cDAQ1Mod3/port0/line1, etc.. Digital 1 d 1Samp Bool NChan read VI returns an array of 64 D 1 of Boolean elements. If you have used the Digital 2D Bool NChan 1Samp VI instead, you would get a 64 x 1 matrix, there are 64 virtual channels with 1 line of each.

    Brad

  • Cannot copy file names that include the slashes, commas, etc.

    Hello.

    I am trying to copy files from my old Mac G5 tower (about 10 years).  But my copy fails with an error message when trying to copy a file name that includes a special character.  Is there a way to get around this?

    To clarify: when it runs in a file with special characters, it gives me the error message that the file name is too long or contains special characters.  The problem is that when I click 'OK' to confirm the error (not), the copy is aborted.

    Any ideas?

    Thank you!

    E. -.

    Oh!  Well I guess you will have to wait for someone with a Mac experience for you then help.  I do not have one.  I'm sorry.

    BTW, you should post your question on Apple/Mac forum.  Many experienced people who can help you.   Good luck.  :-)

  • The search in Vista for a document that contains the word or phrase

    I have a computer running Win XP, and with its search function, I can look for a document by typing a few words that I know are in it.

    I can't understand how to do this in Vista. Can someone tell me the answer?

    Open a folder.
    Click on "Organize", then "Options records and research."
    Click on the tab "search". Under "what happens to research."
    Always select "to the names of files search and content' or"in index locations, find the names of files and content, in locations not indexed, search file names only".
    Click OK

    teengeek.freehostingcloud.com Microsoft community contributor

  • That includes the support of product recovery cd?

    Hello

    I just bought a new Toshiba Satellite U400/03 s today and I was wondering what includes the cd of "product recovery media"? Is this the same as the windows recovery cd + all re-installers driver? Oh, and since my laptop has installed windows vista professional, but the recovery media allows for me to downgrade to windows XP pro, the cd of "product recovery media" would include both windows (vista AND xp)?

    Thank you!

    Hello

    I assume you have the Australian cell phone model. I don't know with certainty how notebooks are configured here, but in General, all new laptops are delivered without recovery media.
    You must create a recovery using 'Toshiba Recovery Disc Creator' media. It's a small tool preinstalled on your laptop and use this tool, you can create recovery DVDs Vista.

    This DVD you can use for the installation of Vista more far. You can use it so often desired.
    As far as I know, some laptop models are also supported for Windows XP Home edition and some laptops come with separate recovery WXP media. So you can use Vista (factory settings) and you can also install additional Windows XP Home edition, using this recovery media.

    Before anything please create recovery DVDs Vista.
    Sorry, but I can't say with certainty what is in this DVD.
    Can you please send what is written on it?

  • How do you know the name of table or index that has the segment?

    Hi all

    I want to move the data to the LOB_TABSPC on LOB_TABSPC1 tablespace. I almost moved my data. But when I checked the LOB_TABSPC tablespace, there is still a segment:

    Line: -.
    Select dba_segments nom_segment, nom_partition, SEGMENT_TYPE, nom_tablespace, HEADER_FILE, HEADER_BLOCK, BYTES, BLOCKS, EXTENTS where OWNER = 'xxx' and nom_tablespace = 'LOB_TABSPC. '

    Rank # nom_segment nom_partition SEGMENT_TYPE nom_tablespace HEADER_FILE, HEADER_BLOCK BYTES BLOCKS SCOPES
    1 SYS_IL0000103064C00019$ $ SYS_IL_P87 INDEX PARTITION 18 59 131072 16 2 LOB_TABSPC
    2 SYS_IL0000103064C00019$ $ SYS_IL_P88 INDEX PARTITION 18 67 65536 8 1 LOB_TABSPC
    3 SYS_IL0000103064C00018$ $ SYS_IL_P83 INDEX PARTITION 18 27 196608 24 3 LOB_TABSPC
    4 SYS_IL0000103064C00018$ $ SYS_IL_P84 INDEX PARTITION 18 35 196608 24 3 LOB_TABSPC
    5 SYS_LOB0000103064C00018$ $ SYS_LOB_P81 LOB PARTITION 18 11 34603008 4224 48 LOB_TABSPC
    6 SYS_LOB0000103064C00018$ $ SYS_LOB_P82 LOB PARTITION 18 19 33554432 4096 47 LOB_TABSPC
    7 SYS_LOB0000103064C00019$ $ SYS_LOB_P85 LOB PARTITION 18 43 11534336 1408 26 LOB_TABSPC
    8 SYS_LOB0000103064C00019$ $ SYS_LOB_P86 LOB PARTITION 18 51 13631488 1664 28 LOB_TABSPC
    Line: -.

    I don't know the table or index that has these segments to move into the new tablespace.
    Please help me...

    Use the dba_lob_partitions view.

  • Can I get the total number of records that meet the conditions of a query using the Table API?

    Hello

    A < row > TableIterator is returned when I ask operations using the index of tables. If I want to get the total number of records, I count one by one using the returned TableIterator < row >.


    Can I get the total number of records directly meets the conditions of the query?

    I can get the total number of records directly the request of the meeting of the conditions of CLI using the command Global table - name tableName - count - index index-name-field fieldName - start startValue-end endValue.

    Can I get the same results using the Table API?

    I used MongoDB and NoSQL Oracle for about a year. According to the experience of the use of these dbs, I think mongoDB querying interface is powerful. In the contras, the query interface is relatively simple, which results is a lot of work that is usually a long time in the client side.

    Hello

    Counting records in a database is a tricky thing.  Any system that gives you an accurate count of the records will have a hotspot of concurrency on updates, namely the place where the counting is maintained.  Such a count is a problem of performance in addition to competitive access problem.   The problem is even more difficult in a system widely distributed such a NoSQL database.

    The CLI has overall command that counts, but does so by brutal force - iterate keys that correspond to the parameters of the operation.  This is how you must do this within the API.  There is not a lot of code, but you have to write.  You certainly want to use TableIterator TableAPI.tableKeysIterator (), because a key iteration is significantly faster than the iteration of lines.  Just one iteration and count.

    If you use TableAPI.multiGet () and a key with a touch of brightness full then, in fact, count the results as they are returned in a single piece (a list).

    Kind regards

    George

  • I am trying to create a package for 8 Captivate that includes NeoSpeech voices

    I'm packing 8 Captivate using CC package.  I need to add the NeoSpeech voices to the package.  I run package manager to build the package with the msi using our license of the company that gives me applications and patches.  There is nothing for NeoSpeech well and I include NeoSpeech with the msi.

    Hello

    In order to create a Neo Speech voices to Captivate 8 msi package, you must use Adobe Application Manager Enterprise Edition 3.1 (AAMEE 3.1).

    You can download AAMEE 3.1 by visiting the link:- http://www.adobe.com/devnet/creativesuite/enterprisedeployment.html

    Kind regards
    Ajit

  • How can HI I create a printing guide for my business card with a size that includes the purge (3.75x2.25)

    Screen Shot 2015-09-25 at 1.27.16 PM.png

    It should look like this, the paper size is 12 in. x 18 in. thanks

    Create a 3.5 "x 2" "document to. 125" bleeds, the design of the map, place the file in the IDENTITY card in a 12 'x 18' document, step and repeat. " In this case, you can make corrections to a master doc and update the doc step and repeat. When you place the card check Display Options, so you can set with the bleeding.

  • Is it possible for a Cascade application change the Notification Mode to vibrate at normal

    I am interested in creating a timer application that returns my phone in 'Vibrate only' notification 'Normal' after a period of time defined.  I knshow you need to set permissions, but I didn't know anything like that to give permission to do so.  I have a Z10 with 10.2.1 on it.

    Is this possible or not BB 10.2.1 avoid this?   It would be nice to be able to do.

    A snippet of code showing how to set up permissions for this would be useful.

    You can change the Notification Mode since 10.2, here's what you need to do.

    Add this line to the bottom of the file bar - descriptor.xml, under the tab "source":

    access_notify_settings_control
    

    Add this line to your .pro file:

    LIBS += -lbbplatform
    

    Add this to your file:

    #include 
    
    public: Q_INVOKABLE void switchMode();private:
        bb::platform::NotificationGlobalSettings* notificationGlobalSettings;
    

    Add this to your .cpp file:

    void YourClass::switchMode()
    {
        if (notificationGlobalSettings->mode() == bb::platform::NotificationMode::Normal) {
            notificationGlobalSettings->setMode(bb::platform::NotificationMode::Vibrate);
            break;
        } else if (notificationGlobalSettings->mode() == bb::platform::NotificationMode::Vibrate) {
            notificationGlobalSettings->setMode(bb::platform::NotificationMode::Normal);
            break;
        }
    }
    

    Simply call switchMode() function in c ++ or QML to switch between the Normal and the vibrator. Note that this code will do nothing if the mode is set to anything else than Normal or vibrate. If you prefer to scroll through all the available Notification mode, use this function:

    void YourClass::switchMode()
    {
        switch (notificationGlobalSettings->mode()) {
            case bb::platform::NotificationMode::Normal : {
                notificationGlobalSettings->setMode(bb::platform::NotificationMode::PhoneOnly);
                break;
            }
            case bb::platform::NotificationMode::PhoneOnly : {
                notificationGlobalSettings->setMode(bb::platform::NotificationMode::Vibrate);
                break;
            }
            case bb::platform::NotificationMode::Vibrate : {
                notificationGlobalSettings->setMode(bb::platform::NotificationMode::Silent);
                break;
            }
            case bb::platform::NotificationMode::Silent : {
                notificationGlobalSettings->setMode(bb::platform::NotificationMode::AlertsOff);
                break;
            }
            case bb::platform::NotificationMode::AlertsOff : {
                notificationGlobalSettings->setMode(bb::platform::NotificationMode::Normal);
                break;
            }
            default : {
                notificationGlobalSettings->setMode(bb::platform::NotificationMode::Normal);
                break;
            }
        }
    }
    
  • backup software for windows 2003 server, including the bad to recover sector

    Dear Sir/Madam

    I would like to inform you, I have a server windows Server 2003 research, recently, I make it impossible problem backup everything by making the bad sector error bachup, I tried the software Symantec and acronics in both get same number, I know important data want to reason disk HARD full backup, so I can't extend I will also make the new HDD .i tried scan disk while getting the same question.
    on this subject please help me.
    Thank you & best regards
    AKhil
     
     
     
    Hello:
    I have 1 month here before the backup I restore with success but how copy us the recent HARD disk to one another restore HDD.how is possible.

    Hello

    Thank you for posting your question, however, this question would be better suited for the Microsoft Tech Net forums.

    Click on the link below and post your question there.

    http://social.technet.Microsoft.com/forums/en/category/WindowsServer/

  • BlackBerry 8310 Smartphone of Smartphones (BB has been DEAD for upgrading applications that use the Device Manager)

    Hello, recently I wanted to install an application but got an error message saying AJAX is not supported on your platform - after checking the forums on this site, I found that I need to upgrade to 4.5.X and for that I downloaded from this site the "8310M_PBr4.5.0_rel52_PL2.7.0.55_A4.5.0.37 [1].

    When I connect the device to the computer, I got the message from device manager asking if I want to upgrade applications to current version,

    I did it-but suddenly during the upgrade process, my blackberry is turned off and since impossible to turn it on again, it looks like my smart phone is completely dead! There's just a red light on the top flashing...

    That's all just amazing, because I have no idea why this happened because I used this official site and Device Manager was the one I downloaded from this site for 8310 Smartphone

    Can someone HELP me please?

    Thank you

    PAM

    Great!

    You please resolve this thread by using the options on the star of the kudo?

    Thank you very much!

Maybe you are looking for