Bad perfornance when I have one NULL field in the table

Someone knows why the query performance is bad whe I run this command without NVL function?
DELETE FROM A.Lote
WHERE .... AND
NLOT NOT IN (SELECT NVL(LOTP, '*') FROM A.OP))
I have a unique index for this field (LOTP in OP).
When exist one register that the field LOTP is null, this performance is very bad. However, if I delete, update this fied for other value, the returne is fast.

If one of op.lotp is null, the condition not in (..null..) is always false, and the query make no sense...
bad performance for a query doing nothing :-(
Try
DELETE FROM A.Lote
WHERE .... AND
not exists (select * from a.op where lote.NLOT = op.LOTP);

Similar Messages

  • Hi. I habe one old ID and now i have one new ID. The old one is bad , because the Email not working. But i hav a lot of Apps and i want to copy this apps in my new ID. How can i do this?

    Hi. I habe one old ID and now i have one new ID. The old one is bad , because the Email not working. But i hav a lot of Apps and i want to copy this apps in my new ID. How can i do this?

    You don't. Apps are permanently tied to the ID used to purchase them. Instead of creating a new ID, change the primary email address on your existing ID.

  • I've recently started to use Numbers but when I try to sync to iCloud it asks me to create a new iCloud account. Problem is I already have one and that's the one I want to use. Looks like I have the same situation on my iphone. Any guidance? Thanks.

    I've recently started to use Numbers on my macbook pro but when I try to sync to iCloud it asks me to create a new iCloud account. Problem is I already have one and that's the one I want to use.
    Looks like I have the same situation on my iphone.
    The only option I'm being given is to create an lCloud account.
    Any guidance? Thanks.

    The last thing you want is a second iCloud account. Try logging out and back in in System Preferences. If that doesn't work, I'd get AppleCare on the line.
    Jerry

  • HT3986 a message appears telling me that i need a usb drive (even when I have one)

    a message appears telling me that i need a usb drive (even when I have one)

    This message could refer to the Windows drivers which can be on an USB drive you create or a Windows installation ISO on a USB drive
    From the manual
    You can download the Windows support software and copy a Windows 7 ISO image to a USB flash drive.
    To install Windows 7 with a USB flash drive, you need the following: An ISO image of Windows 7 Home Premium, Professional, or Ultimate downloaded from Microsoft.
    A USB flash drive with 4 GB or more.
    Boot Camp Assistant erases the flash drive, and copies to it the Windows 7 ISO image and software drivers that let Windows work with your Mac hardware

  • Which badi suits when Service PO is entered and deleting the sub items

    Hi Experts,
    Can any body tell me, Which badi suits when Service PO is entered and deleting the sub items.
    My req. is the end user not delete the sub items of service PO, when GR is done.
    Full points will be given.
    Regards
    Naveen.

    Hi Friends,
    Ok, I am using the same BADI, But my exct req is.
    Hi Friends,
    I have a Service PO say "1111111111" .......
    But i can have any number of sub items say "4" in the item level (in services tab) .................
    As far i know ...
    EKPO --> I get the PO items ...
    ESLL --> all the service details ...
    I ve got the PACKNO field.... but my problem is ...
    say in EKPO the Packno = 2888
    in ESLH i have a packo = 2888
    My Problem is ....
    In ESLL --> if i put Packno = 2888, iam getting some data ..... in that there is a field called SUBPACKNO and this is storing a number 2889 ....
    Only when i give SUBPACKNO 2889 again in Packno of table ESLL iam getting the total sub items of that services.
    So how could i get that ....
    But my problem is, the GRN is done for any on of the sub item of that service, and all are open, suppose the end user clicks on one sub item and he deletes that record, so at that time i need to check wheather that record is done for GRN or not, if GRN is not done then i can delete that record.
    But my problem is how do i know the end user on which record he clicks. my func conslt suggested me this badi ME_PROCESS_PO_CUST. but in this badi i am not getting the exactly the end user clicked record.
    So please help. its an urgent issue.
    how to work on it.
    Thanks in advance,
    Regards.
    Naveen.

  • Search Help on Table Control - Fill more than one field in the table?

    Hey everyone,
    I have built a screen with a Table Control on it... the fields of the table control are linked to an internal table...  The internal table has the line type of a structure I've defined in the data dictionary.  Within that structure in the data dictionary, I've linked some fields to search helps (For example, a MATNR and CUSTOMER search help)...  I've defined in the structure definition which fields from the search help are to be returned to which fields in the structure.
    The problem is, even though I have the search help set to export both the customer number and location when using the search help on the customer field, it still does not fill the location field within the table.  Is this a limitation of using search helps within table controls?
    I'm also finding that by defining the search help through the structure, instead of directly within the screen, the search help round button does not show up on the field, yet I can still press F4 to bring up the search help.  Is there a reason why it's not showing the search help clickable button even though it works fine using F4?
    For doing search helps in Table Controls, is it better to just build the search help, attach it directly to the field in the table, and then after the user picks the single field, use the PAI to run a select and fill the rest of the fields required?
    Thanks,
    Dallas

    Hi Dallas,
    (1)
    What  i understood is that you added a search help by defining it in the internal table type for a field customer number..in the search help you have 2 fields customer number and location...user press the search help ..then you need to fill 2 different fields or 1 field?
    if you need to fill the customer location or location (only one) then you need to set the "import" in the search help for whichever is required.....
    if you need to fill 2 or more different fields..then you can use the technique you have mentioned last , to do a select in PAI and fill the fields....but this you can use if the combination for the fields is unique...eg: u have customer number and location..if customer X can be mapped to location X and location Y..when a select statement is done there are 2 options..so in such cases it is better to leave the option to the user otherwise if there is a clear mapping like customer X can be mapped only to location X then you can use the select..
    (2)
    usually when you define it as a type in the internal table the icon doesn't show up..but you can do alternative like mentioned..go to the table,find the search help for the required field if present or create a new one if required and place the search help mentioned in the screen itself..so as to see the icon...sometimes users are adamant that they need the search help icon to be seen..so it depends on if your user
    (3)
    as in the example of customer number and location mentioned we can provide them different search helps and do the needful processing in PAI to fill the fields
    Table controls may be used for different purposes and requirements....even a checkbox,push button can be placed as a field in table control and used,but yes most of the time requirements are like what is mentioned in your case...
    Regards
    Byju

  • OIM reconciliation fails when more then one record in trusted source table

    I've create a reconciliation connector against an oracle table with 2 colums:
    user_id
    email
    When I run the connector with only one record exists in the table everything works fine and the user is propogated to the OIM user store. If I add a second record and run the reconciliation again I get:
    ERROR,18 Jun 2010 10:15:58,715,[XELLERATE.JMS],The Reconciliation Event with key -1 does not exist
    ERROR,18 Jun 2010 10:15:58,716,[XELLERATE.JMS],Processing Reconciliation Message with ID -1 failed.
    I'm fairly certain this is something simple.
    Does anyone have any thoughts?

    How about performing the update IN the database using a stored
    procedure?
    By using non-database fields on your form to get the
    information, you can then call the procedure in the database to
    perform the updates. If an error occurs in the procedure you
    rollback, if necessary, and send a message or status back to the
    form. If it succeeds you might wish to commit and then re-
    execute the form's query -- using either the original key values
    or the new key values...
    null

  • HT1338 How can i use my data on windows or mac when i use one of them in the same time?

    Hi,
    i have a Mac book with 2 operating system, ( Windows& mac). How can i use my data on windows or mac when i use one of them in the same time?
    Thank you

    The following article(s) may help you.
    Resolving duplicate calendars
    Resolving duplicate contacts

  • Why when I am resizing a field do the fields above and below resize too? Can I turn this feature off?

    Why when I am resizing a field do the field above and below resize with it too? I need to make them different lengths. This only happens sometimes. HELP! THANKS!

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • HT1386 I cannot find how to keep previous photo albums loaded on Ipad when syncing new ones with iTunes. The old ones are wiped out every single time

    I cannot find how to keep previous photo albums loaded on Ipad when syncing new ones with iTunes. The old ones are wiped out every single time

    If it's not too late, see Recovering your iTunes library from your iPod or iOS device. As long as you have a backup of the device when the device still held your photos you should stand a chance of recovering them using a tool such as iPhone Backup Extractor.
    tt2

  • Have one WiFi signal into the apartment for my Air, and another wifi signal for my 5c phone plan. Both from the same provider. Expensive. Is there a way to 'combine' WiFi signals so I pay only for one, but can get on the Internet with my Air?

    Have one WiFi signal into the apartment for my Air, and another wifi signal for my 5c phone plan. Both from the same provider. Expensive. Is there a way to 'combine' WiFi signals so I pay only for one, but can get on the Internet with my Air?

    Roamingnome, thanks for your response. Although I have been a Bell (Canada) customer for my WiFi signal for years, the 5c and its necessary mobility plan, is very recent. Some years ago, Bell supplied its own ‘router’ for my computer, and claimed that it was possible to get their WiFi signal only with the router they supplied. When I recently received the 5c, I wondered if the plan it requires, which is within the much wider, overall Bell zone, could be used somehow to get my Air online - some sort of tethering? - that allows me to give up the Air WiFi service and router all together, but still get the Air connected. Here in Canada, Bell Mobility and other Bell services are very separate. Any suggestions appreciated.

  • When I have my handsfree plugged in, the sms-tone and incoming-call ringtone is only played in my earpluggs. Any suggestions anyone?

    When I have my handsfree plugged in, the sms-tone and incoming-call ringtone is only played in my earpluggs. Any suggestions anyone?

    I experience the same problem and it's extremely annoying. Have you found a solution yet? 
    Of course one might want to keep the earphones plugged in most of the time (if this is the way you prefer to answer you calls + talk on the phone) even if you're not using the phone/earphones. The ringtone does come through to to the speaker when someone calls… yet the sms signal DOES NOT and only plays in the earphones.   
    This means that the earphones must be unplugged after every call and then plugged in again before every call in order not to miss any sms:es! (Talk about unsafe driving e.g.!)
    It would seem to be such an obvious setting/option to include in the iPhones settings. Why has Apple has completely missed this!? .... or is there a solution?
    I have searched the internet but haven't found a solution?

  • I only have one iTunes account.  The other day I made the mistake of downloading purchased songs and movies logged on another user account (Administrator) on the same computer.  How do I consolidate all my purchases in my preferred user account?

    I only have one iTunes account.  The other day I made the mistake of downloading purchased songs and movies logged on another user account (Administrator) on the same computer.  How do I consolidate all my purchases in my preferred user account?

    copy the songs that you downloaded as admin and put it somewhere you can access it from you're preferred account (usb stick / cd / shared folder / external hard drive) log into with you preferred user account and drag and drop the files on top of the itunes icon and they will be imported.
    if you have a second computer you could use home sharing to move the music from admin itunes to the second computer and from the second computer to the preferred itununes
    ps you can only connect 5 computers to you're itunes account so don't forget to de-autorise when you no-longer wand it.

  • I have one apple id, but the family all have ipods, imac and mac book connected to this account. how do i face time them?

    i have one apple id, but the family all have ipods, imac and mac book connected to  this account. how do i face time from one device to another?

    Hello chlanli
    You would need to use one Apple ID for purchases in order to get them across all of your devices and computer. If you want you can use one Apple ID for purchases and the other one to sync personal data. The article below will explain further.
    Using your Apple ID for Apple services
    http://support.apple.com/kb/ht4895
    Regards,
    -Norm G.

  • Adobe InDesign CC 2014 Custom Panel Built With Extension Builder - Problem: Can't tab from one entry field to the next; Hitting tab instead hides all palettes; Is there a fix? This didn't happen in Adobe Indesign CC

    Adobe InDesign CC 2014 Custom Panel Built With Extension Builder - Problem: Can't tab from one entry field to the next; Hitting tab instead hides all palettes; Is there a fix? This didn't happen in Adobe Indesign CC

    This is planned to be fixed in the next release.

Maybe you are looking for