Operator "LIKE" versus operator "="

I have textual column C in table T, and parameter P.
If parameter P has value "abc"
then is there difference in perfomace between those 2:
"where T.C like P"
"where T.C = P"
Both conditions produce same resultset of the query. But maybe with LIKE operator the query is slower? And you would still suggest to use operator "=" if possible?

>
I don't believe that testing gives the correct answer.
I believe there is a theoretical answer to the question.
>
Why not? Yes, there could be difference in parsing the command, but regarding the execution time, I don't see a difference in my example, do you?
SELECT *
  FROM v$session
WHERE USERNAME = 'ANONYMOUS'
Execution Plan
Plan hash value: 3733760267
| Id  | Operation                | Name            | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT         |                 |     1 |  1064 |     0   (0)| 00:00:01 |
|   1 |  NESTED LOOPS            |                 |     1 |  1064 |     0   (0)| 00:00:01 |
|*  2 |   FIXED TABLE FULL       | X$KSUSE         |     1 |   855 |     0   (0)| 00:00:01 |
|*  3 |   FIXED TABLE FIXED INDEX| X$KSLED (ind:2) |     1 |   209 |     0   (0)| 00:00:01 |
Predicate Information (identified by operation id):
   2 - filter("S"."KSUUDLNA"='ANONYMOUS' AND "S"."INST_ID"=USERENV('INSTANCE') AND
              BITAND("S"."KSSPAFLG",1)<>0 AND BITAND("S"."KSUSEFLG",1)<>0)
   3 - filter("S"."KSUSEOPC"="E"."INDX")
Statistics
          0  recursive calls
          0  db block gets
          0  consistent gets
          0  physical reads
          0  redo size
       6082  bytes sent via SQL*Net to client
        384  bytes received via SQL*Net from client
          2  SQL*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
          7  rows processed
SELECT *
  FROM v$session
WHERE USERNAME LIKE 'ANONYMOUS'
Execution Plan
Plan hash value: 3733760267
| Id  | Operation                | Name            | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT         |                 |     1 |  1064 |     0   (0)| 00:00:01 |
|   1 |  NESTED LOOPS            |                 |     1 |  1064 |     0   (0)| 00:00:01 |
|*  2 |   FIXED TABLE FULL       | X$KSUSE         |     1 |   855 |     0   (0)| 00:00:01 |
|*  3 |   FIXED TABLE FIXED INDEX| X$KSLED (ind:2) |     1 |   209 |     0   (0)| 00:00:01 |
Predicate Information (identified by operation id):
   2 - filter("S"."KSUUDLNA" LIKE 'ANONYMOUS' AND "S"."INST_ID"=USERENV('INSTANCE')
              AND BITAND("S"."KSSPAFLG",1)<>0 AND BITAND("S"."KSUSEFLG",1)<>0)
   3 - filter("S"."KSUSEOPC"="E"."INDX")
Statistics
          8  recursive calls
          0  db block gets
          2  consistent gets
          0  physical reads
          0  redo size
       6082  bytes sent via SQL*Net to client
        384  bytes received via SQL*Net from client
          2  SQL*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
          7  rows processedC.

Similar Messages

  • Noise Ninja Workflow

    I tried to initiate this topic of discussion in the NN online forum, but participation seems light there.
    The NN FAQ states the following: "It is usually best to apply noise reduction as early as is practical in the workflow. Post-processing adjustments like sharpening, contrast stretching, and color balancing can alter pixel values and noise levels in unpredictable ways. Depending on the amount of adjustment, this can make it more difficult for Noise Ninja to estimate noise levels. Sharpening, for instance, is a nonlinear operation that can significantly distort the distribution of noise values.
    If your workflow requires that you use Noise Ninja after some other operations, then try to create noise profiles using calibration images that have been put through the same operations.
    Running Noise Ninja early in the workflow is a good rule of thumb, but Noise Ninja can be applied at any time. Sometimes it may not be possible or practical to run Noise Ninja at an earlier point in the workflow. For example, most users are not using a RAW processor with plug-in support so they run Noise Ninja after the RAW processing step."
    Although it seemed less than obvious in this statement that RAW processing must be completed before editing with the NN plugin, but this would appear to be the case, since the plugin is not using RAW file, and the file returned is no longer subject to the normal edit controls used for RAW images?
    But when now going back over many existing projects and images to enhance via NN, the question is really to the difference between applying NN to the existing Versions, versus trying to back up to a point prior to adjustments having been applied that are not dependent upon RAW processing?
    What are the Pros and Cons of what was stated above: "using a RAW processor with plug-in support so they run Noise Ninja after the RAW processing step" insofar as processing new images?
    Ernie

    Ernie Stamper wrote:
    The NN FAQ states the following: "It is usually best to apply noise reduction as early as is practical in the workflow...Sometimes it may not be possible or practical to run Noise Ninja at an earlier point in the workflow. For example, most users are not using a RAW processor with plug-in support so they run Noise Ninja after the RAW processing step."
    Well, since NN does not have its own raw converter, it has to work with tif, jpeg files. Which means that raw file was converted somewhere. My guess is that many are converted to tif or jpeg in the camera; hence, the profiles are available for various camera models and ISO settings.
    Since each raw converter translate sensor data differently, how it handles noise is also subject to different algorithms.
    Although it seemed less than obvious in this statement that RAW processing must be completed before editing with the NN plugin, but this would appear to be the case, since the plugin is not using RAW file, and the file returned is no longer subject to the normal edit controls used for RAW images?
    The stand alone NN app does not read raw files. Just more options than the plug in. Once tif file is returned to Aperture environment, all the adjustments are available, except ones that has to do with raw conversion.
    But when now going back over many existing projects and images to enhance via NN, the question is really to the difference between applying NN to the existing Versions, versus trying to back up to a point prior to adjustments having been applied that are not dependent upon RAW processing?
    Why not just create new version from master, adjust white balance, then use NN. The plug-in tif file is also non-destructive and can apply all the Aperture controls.
    What are the Pros and Cons of what was stated above: "using a RAW processor with plug-in support so they run Noise Ninja after the RAW processing step" insofar as processing new images?
    In most simplistic terms:
    Pro: less noise in high iso images
    Con: large tif files, leads to less details in the image
    There is a tradeoff between retaining all the sharpness that you'd like versus getting rid of noise that degrade the image quality - it is a personal choice.

  • Files that were moved are still displaying in old location.

    Hello,
    I was recently doing some reorganization of some files in my iCloud account in Finder (In the iCloud tab). When I went to sign into iCloud.com the next day and go to iCloud Drive, for some reason the images that I had moved the day before were still in their old locations. The day before, I also rearranged some folders and made some new ones. Those were updated when I went to iCloud.com, but the images were still there. Here are some screen shots showing what my Finder looks like versus iCloud.com, as of right now. (I do realize that there are some extra apps displayed in iCloud.com, but just ignore those. Notice the images, like the first two listed on the screen)
    Notice the extra images on iCloud.com. Anybody know why this is happening? (I tried clearing my cache and cookies, but with no avail)
    Thanks in advance for the help!
    Alan

    Ok,
    I solved it. For some reason when I moved the event folder it created a second event folder in iMovie. This second event folder seemed to be overriding, or not allowing the original event folder to be read. So I moved all of the video files out of the original event folder and moved them to the new event folder.
    It's currently re-generating thumbnails for all the videos but this seems to have solved the problem.

  • Historical Reporting of data under multiple hierarchy changes

    We currently use Hyperion Planning and we change our entity hierarchy often. It is my understanding that in order to report on what the hierarchy "used" to look like versus the current hierarchy requires alternate hierarchies that represent those different points in time. Today we just report all data based on the new hierarchy. However, we are looking at some additional requirements where this could become an issue. Due to the likely significant changes in the hierarchy, we would not want to maintain different hierarchies for all of these changes.
    My question is first, is this a correct understanding for Hyperion Planning?
    I did see a power point someone posted online that did show that HFM was able to handle this type of requirement, is that correct? Are we able to add an attribute or rule that combines some type of date tag to when the child was under parent A versus when they rolled under parent B. I have looked through the HFM admin guide and users guide online, but didn't see anything that addressed this specific issue. I watched a few tutorials online as well and didn't see anything that seemed to answer my question.
    Thanks.

    Hi user10086086,
    It is true that in order to maintain historical rollups in Hyperion Planning you have to maintain historical heirarchies or become cleaver at storing historical heirarchies for purposes of reproting back to past methods of reporting.
    HFM does have the capability to store alternate entity hierarchies from one period to the next - when Organization by Period is enabled within HFM...
    The most common entity restructuring is as follows (This is not to say the only type - there are many other types):
    Using the Manage Ownersip module within HFM
    • An entity is set to be inactive under it's first parent, the balances are frozen for that period (under the first parent), the entity is “recreated” with same name (under a new parent) and “new” balances will be loaded under the new parent for the next and all subsequent periods
    By using the same entity with the OrgByPeriod feature within HFM and setting dates for its association with a particular parent with the 'Manage Ownership module' it becomes possible to have alternate entity heirarchies for different periods.
    In order to advise on the most appropriate approach it would be necessary to confirm some key points on the requirement; such as, consolidation and translation methods used. Are the rules written to effectively handle opening, closing, movements in an OrgbyPeriod structure? Are there specialized rules/calcs in place that would affect the use of the OrgbyPeriod option? ..etc.
    To get an overview of the feature please checkout Oracle Hyperion Financial Management - Administrator's Guide at:
    http://download.oracle.com/docs/cd/E17236_01/epm.1112/hfm_admin.pdf
    The following is and excerpt from the guide:
    Chapter 4 Managing Metadata
    Organization by Period - page 86
    The organization by period functionality enables the most recent consolidation structure to coexist with past structures in the same application.
    Organizational structures can change for many reasons, including acquisitions, disposals, mergers, and reorganizations. To support organizational changes, Financial Management uses a system account, Active, to reflect the active or inactive consolidation status of a child into its parent. The Active account acts as a filter of the entity hierarchy. The Active account is an intercompany account that stores data at the parent level and uses the ICP dimension to store information about children.
    I hope this answers your question. Please feel free to drop me a note if you have any questions regarding this post
    G'Luck
    -David
    A good place to start for Hyperion documentation is:
    http://www.oracle.com/us/solutions/ent-performance-bi/technical-information-147174.html
    Or
    http://www.oracle.com/technetwork/middleware/epm/documentation/epm-096302.html
    A good place for learning about the Hyperion products and their features is:
    http://www.oracle.com/technetwork/tutorials/index.html
    Hyperion specific tutorials:
    http://apex.oracle.com/pls/apex/f?p=9830:hyperion:1797489450022582::NO:::
    A good place to read about best practices and find white papers is:
    http://www.oracle.com/technetwork/middleware/bi-foundation/resource-library-090986.html
    A great place to get an excel macro that tells you what new product features have been added since the last version is:
    https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=1092114.1
    My Oracle Support - Knowledge Base is a collection of articles, examples, illustrations, solutions, resources, and services.
    My Oracle Support is a service provided by Oracle
    My Oracle Support is available as part of your Oracle Premier Support subscription. To get started, visit oracle.com/support, click on My Oracle Support, and begin reaping the benefits of this exclusive Web support portal:
    https://support.oracle.com/

  • Can I use a LIKE operator in an IF statement in a column formula

    This is what I have so far.
    CASE WHEN Opportunity."Sales Type" LIKE '*New Acct' THEN 'Sale to NEW Customer' END
    I want to display 'Sale to NEW Customer' if opportunity type contains the terms New Acct.

    Try this:
    CASE WHEN Opportunity."Sales Type" LIKE '%New Acct' THEN 'Sale to NEW Customer' END
    The LIKE operator requires a % wildcard rather than the * wildcard.
    Mike L.

  • Why the 'LIKE' operator takes so much time to run?

    I have a table T with 3 columns and 3 indexes:
    CREATE TABLE T
    id VARCHAR2(38) NOT NULL,
    fid VARCHAR2(38) NOT NULL,
    val NVARCHAR2(2000) NOT NULL
    ALTER TABLE T ADD (CONSTRAINT pk_t PRIMARY KEY (id,fid));
    CREATE INDEX t_fid ON T(fid);
    CREATE INDEX t_val ON T(val);
    Then I have the following two queries which differ in only one place - the 1st one uses the '=' operator whereas the 2nd uses 'LIKE'. Both queries have the identical execution plan and return one identical row. However, the 1st query takes almost 0 second to execute, and the 2nd one takes more than 12 seconds, on a pretty beefy machine. I had played with the target text, like placing '%' here and/or there, and observed the similar timing every time.
    So I am wondering what I should change to make the 'LIKE' operator run as fast as the '=' operator. I know CONTEXT/CATALOG index is a viable approach, but I am just trying to find out if there is a simpler alternative, such as a better use of the index t_val.
    1) Query with '=' operator
    SELECT id
    FROM T
    WHERE fid = '{999AE6E4-1ED9-459B-9BB0-45C913668C8C}'
    AND val = '3504038055275883124';
    2) Query with 'LIKE' operator
    SELECT id
    FROM T
    WHERE fid = '{999AE6E4-1ED9-459B-9BB0-45C913668C8C}'
    AND val LIKE '3504038055275883124';
    Execution Plan
    0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=1 Card=1 Bytes=99)
    1 0 TABLE ACCESS (BY INDEX ROWID) OF 'T' (Cost=1 Card=1 Bytes=99)
    2 1 INDEX (RANGE SCAN) OF 'T_VAL' (NON-UNIQUE) (Cost=4 Card=12)

    I will for sure try to change the order of the PK and see whether there will be any impact to the performance.
    In our application, val is much closer to a unique value than fid. In the example query, the execution plan showed that the index on val was indeed used in the execution of the query. That's why the 1st query took almost no time to return (our table T has more than 6 million rows).
    I was hoping the 'LIKE' operator would utilize the t_val index effectively and provide similar performance to the '=' operator. But apparently that's not the case, or needs some tricks.

  • [Microsoft][SQL Server Native Client 11.0][SQL Server]The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.  'Items' (OITM) (OITM)

    Dear Experts,
    i am getting the below error when i was giving * (Star) to view all the items in DB
    [Microsoft][SQL Server Native Client 11.0][SQL Server]The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.  'Items' (OITM) (OITM)
    As i was searching individually it is working fine
    can any one help me how to find this..
    Regards,
    Meghanath.S

    Dear Nithi Anandham,
    i am not having any query while finding all the items in item master data i am giving find mode and in item code i was trying to type *(Star) and enter while typing enter the above issue i was facing..
    Regards,
    Meghanath

  • Error in SQL Query The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. for the query

    hi Experts,
    while running SQL Query i am getting an error as
    The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. for the query
    select  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price ,
    T2.LineText
    from OQUT T0  INNER JOIN QUT1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN
    QUT10 T2 ON T1.DocEntry = T2.DocEntry where T1.DocEntry='590'
    group by  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price
    ,T2.LineText
    how to resolve the issue

    Dear Meghanath,
    Please use the following query, Hope your purpose will serve.
    select  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price ,
    CAST(T2.LineText as nvarchar (MAX))[LineText]
    from OQUT T0  INNER JOIN QUT1 T1 ON T0.DocEntry = T1.DocEntry LEFT OUTER JOIN
    QUT10 T2 ON T1.DocEntry = T2.DocEntry --where T1.DocEntry='590'
    group by  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price
    ,CAST(T2.LineText as nvarchar (MAX))
    Regards,
    Amit

  • Why does the new operating system not delete the moved files from their original location - it seems like an enormous waste of space, time and effort to clean up every file once you've moved it

    Why does the new operating system not delete the moved files from their original locations - it seems like an enormous waste of space, time and effort to clean up every file once you've moved it - also, when transferring large amounts of files it becomes a very large problem remembering which files were transferred and which not.

    You're going to need to be more specific, as I'm not quite sure I understand what you're talking about.
    If you're referring to copying from an external hard drive or flash drive, and you want to actually move files rather than copy them, you can hold down the option key to force it to do a "move" rather than a "copy." This is not new behavior, though... the Mac OS has worked this way as long as I can recall (and I've been using it since 1984).
    If you're having a problem with trying to move files from one place to another on a single drive causing them to be copied instead, that is likely because of some permissions issue preventing you from actually being able to move them.

  • Hi Friends... I'm trying to delete a back-up file on mu TC but I get the message "The operation could not be completed because the item "bands" is in use. I'd like to start the Back from scratch, could help me out with deleting the current file?

    Hi Friends...
    I’m trying to delete a back-up file on mu TC but I get the message “The operation could not be completed because the item “bands” is in use. I’d like to start the Back from scratch, could help me out with deleting the current file?

    Sorry, I am very confused. I asked the following question....
    Is this the only backup file on your Mac, or do you have other backup files and data on the Time Capsule disk?
    The answer that you gave was....
    This is the only one
    Now you are saying that....
    But I have lots of other files on Time Capsule! The back up file is only one of them.
    Can you clarify, please?

  • HT4623 I have an iPod with iOS 4.2.1 and would like to up date version 5. The pc I normally sync with has XP operating system. So I can't up date to iTunes 10. And my iPod doesn't show the software update button shown in the article. What can I do?

    I have an iPod with iOS 4.2.1 and would like to up date to version 5. The pc I normally sync with has XP operating system. So I can't up date to iTunes 10. And my iPod doesn't show the software update button shown in the article. What can I do?

    You cannot update it if you can't get the latest version of iTunes. Actually, the latest version of iTunes will run in XP if you have Service Pack 2. Also, you posted in the iPad forum, and your profile shows you have an iPad, but in your post, you say it is an iPod. Is it an iPad or an iPod?

  • Can anyone offer some advice i am looking to upgrade the OS system on one of my macbook pro's, currently running os10.4.11, I would like to upgrade to OS10.5? how would I go about this, and is there a cost, for what is an old operating system now?

    Can anyone offer some advice i am looking to upgrade the OS system on one of my macbook pro's, currently running os10.4.11, I would like to upgrade to OS10.5? how would I go about this, and is there a cost, for what is an old operating system now?

    Since your Mac probably came with 10.4, there is no longer a way to get 10.5 Leopard install media. IF it has the requirements, you may be able to upgrade to 10.6 Snow Leopard by buying the boxed install media at the Apple Store for $30.
    System requirements are found here: http://support.apple.com/kb/SP575
    General support can be found here: http://www.apple.com/support/snowleopard/

  • I have a mac  book pro that i bought in late 2009. My current software is snow leopard version 10.5.8. I would like to get the new lion operating system but I cant without first getting the latest version of snow leopard. it doesnt show on software updat

    I have a mac book pro that i bought in late 2009. My current software is snow leopard version 10.5.8. I would like to get the new lion operating system but I cant without first getting the latest version of snow leopard. however when I go to update my software it doesnt show that any update is available.

    10.5.8 is Leopard, not Snow Leopard. You need the Snow Leopard DVD;
    You can get it only by phone now from Apple.
    In the US, call 1-800-MY-APPLE and ask for a sales assistant. Last quoted price was $19.99 for the single-user and $29.99 for the family licence.
    For other countries, check here; http://support.apple.com/kb/HE57
    Don't forget to ask for Sales; the tech support guys can't help.
    If you want Lion, rather than Mountain Lion, the same Sales team can give you a download code to use at the Mac AppStore.
    To get the App Store, you need to update your new Snow Leopard from 10.6.3 (which is the version on the installer) to 10.6.8 with the combo update; http://support.apple.com/kb/DL1399
    Be warned that the upgrades will render a lot of older software unusable, and will need new drivers for printers and scanners in all likelihood.

  • Would like to be able to select and move multiple folders in one operation.

    Unless I'm missing something really simple here, there doesn't seem to be any easy way of selecting and moving multiple folders at once.
    Here's a little example of a simple task I want to do. I presently have a multitude of folders each seperated by the day the photo was taken on. So in my case for a given year I might have maybe 50 folders or so. It's getting a little cluttered, so all I want to be able to do is to take all the folders for one given year and place them in a folder with that year's date. This should be a simple 30 second task, simply select the folders I want moved by either <CTRL> or <SHIFT> clicking them, and then dragging and dropping them into the new folder.
    Right now, the only way I've figured how to do this this is to drag and drop each folder one by one, never mind that this is a slow process in itself, but to add to the slowness, whenever I try to drag and drop more than one folder consecutively, I get a message saying ... "Can not move a folder while another move operation is in progress...blah blah". Not that I want this to be the fix, but haven't they heard of queuing?
    I've seen people on the net suggest that for this type of task, you should simply move the folders in Windows first and then locate them in Lightroom. Again, unless I'm missing something very simple here, there doesn't seem to be a way to locate multiple missing folders at once. If I have to manually locate each missing folder one by one, then I'd rather just do the drag and drop thing as this would actually be faster.
    I've also tried moving the folders from within Windows first and then using the "Synchronize folder" option, yeah sure this works, but I lose any changes that I've done in Develop module. Not what I'm looking for.

    Daniel is right. It´s really strange that I can´t move several folders in one move! When I need more space on my laptop I move a group of folders (one folder for every photosession) to an archive. Therefore I really would like to move them in one click, not "baby-sitting" the move of each folder.

  • Hello! I would like to know about unlock my iphone 4? IMEI *** Serial number 87******A4T And what operator it is locked?

    Hello! I would like to know about unlock my iphone 4? IMEI **** Serial number 87******A4T And what operator it is locked?
    <Edited By Host>

    I don't know if they have email but you can start here  http://www.apple.com/support/contact/

Maybe you are looking for