Is there any way to improve Query which searches XML data from a table??

hi all,
i have a table which have one column say 'colA' as Varchar(max) datatype which  i  save xml data and it have other cols too 
Currently i am searching data inside this table using like operator
eg:
Select * from tablename where colA like ‘%<tagname>parameterstringvalue</tagname>%’
when i check with the Execution plan i could see it Takes 82% for clusterd index scan ( primarykey col
not ColA)
i added new non clusterd index for the same with include col as ColA and i found nonclusterd index scan
with same estimated I O cost and Extimated operator cost as clusterd index scan
My Question is :-
1. why didnt nonclusterd index seek come?
2. In What way i can improve perfomance for such situvation? i had seen couple of post suggesting to rewrite the Query as SELECT
* FROM myTable WHERE CONTAINS (myCol1, myCol2, "myString").
I Try creating Full text index and found cost increased compared to the original Query ?
3. As per my assumption the wild charecter ('%') in begining makes perfomance issue is there any option
or an alternative for such case?

hi...i can give a skeleton 
--Table Structure------------
Table1:-
(colA - int(PK),
ColB - Varchar(max),
ColC-uniquieidentifier,
ColD-datetime,
ColE-Bit)
It have clusterd index for ColA
Table2:-
(ColA-int(fk)
colF-int(pk)
colG-varchar(max),
ColH-uniqueidentifier,
colI-int,
colJ-int
ColK-date)
-----------------Query Skeleton-------------------: 
select Distinct
s.colA,
s.ColB,
S.colC,
S.colD
from Table1 s with (nolock)
left outer join table2 Q with (nolock) on s.colA=q.ColA
where Q.ColA is null
and s.colB like '%<tag>sometext</tag>%'
and s.colD >='1/1/2010'
and s.colD <='1/1/2014'
i hope this will help to understand it clearly.........

Similar Messages

  • Is there any way to retrieve or recover lost personal data from my Firefox account?

    Not knowing what it really meant, I checked the box that says "Remove my Firefox personal data and customizations" as I was uninstalling Firefox. (I just thought it will remove it from my computer... but not from my account!) Now that I reinstalled it, I realized that it meant removing all of my personal data from my Firefox account. -_____- Is there any way to retrieve them?

    No, I'm afraid not. If you choose to remove personal data when uninstalling Firefox the all Firefox profile folders are removed. Not only from the current Firefox version, but from others as well if you have other Firefox builds installed. This choice should be used with much care.
    You can try to recover some data with an undelete utility like Recuva.
    *Recuva: http://www.piriform.com/recuva
    *https://support.mozilla.org/kb/Recovering+important+data+from+an+old+profile
    *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox
    *http://kb.mozillazine.org/Profile_folder_-_Firefox

  • TS4036 i no longer have my iphone is there any way i can restore my photos, documents, & data from my windows pc?

    i need to retrieve my photostream on my pc from my iphone that i no longer have

    You can set up iCloud and enable photo stream on your pc as explained here: http://www.apple.com/icloud/setup/pc.html, but you will only get back photo stream photos added in the last 30 days. 
    Your camera roll photos and other data and settings would be restored by restoring your backup to a replacement iPhone.  If it's an iCloud backup, it will also restore your purchased apps and other media.

  • How can we improve the performance while fetching data from RESB table.

    Hi All,
    Can any bosy suggest me the right way to improve the performance while fetching data from RESB table. Below is the select statement.
    SELECT aufnr posnr roms1 roanz
        INTO (itab-aufnr, itab-pposnr, itab-roms1, itab-roanz)
        FROM resb
        WHERE kdauf  = p_vbeln
        AND   ablad  = itab-sposnr+2.
    Here I am using 'KDAUF'  & 'ABLAD' in condition. Can we use secondary index for improving the performance in this case.
    Regards,
    Himanshu

    Hi ,
    Declare intenal table with only those four fields.
    and try the beloe code....
    SELECT aufnr posnr roms1 roanz
    INTO  table itab
    FROM resb
    WHERE kdauf = p_vbeln
    AND ablad = itab-sposnr+2.
    yes, you can also use secondary index for improving the performance in this case.
    Regards,
    Anand .
    Reward if it is useful....

  • Is There any way to improve the performance on this code

    Hi all can any one tell me how to improve the performance of this below code.
    Actually i need to calculate opening balance of gl account so instead of using bseg am using bsis
    So is there any way to improve this code performance.
    Any help would be appreciated.
    REPORT  ZTEMP5 NO STANDARD PAGE HEADING LINE-SIZE 190.
    data: begin of collect occurs 0,
           MONAT TYPE MONAT,
           HKONT TYPE HKONT,
           BELNR TYPE BELNR_D,
           BUDAT TYPE BUDAT,
           WRBTR TYPE WRBTR,
           SHKZG TYPE SHKZG,
           SGTXT TYPE SGTXT,
           AUFNR TYPE AUFNR_NEU,
           TOT   LIKE BSIS-WRBTR,
    end of collect.
    TYPES: BEGIN OF TY_BSIS,
           MONAT TYPE MONAT,
           HKONT TYPE HKONT,
           BELNR TYPE BELNR_D,
           BUDAT TYPE BUDAT,
           WRBTR TYPE WRBTR,
           SHKZG TYPE SHKZG,
           SGTXT TYPE SGTXT,
           AUFNR TYPE AUFNR_NEU,
    END OF TY_BSIS.
    DATA: IT_BSIS TYPE TABLE OF TY_BSIS,
          WA_BSIS TYPE TY_BSIS.
    DATA: TOT TYPE WRBTR,
          SUMA TYPE WRBTR,
          VALUE TYPE WRBTR,
          VALUE1 TYPE WRBTR.
    SELECTION-SCREEN: BEGIN OF BLOCK B1.
    PARAMETERS:  S_HKONT LIKE WA_BSIS-HKONT DEFAULT '0001460002' .
    SELECT-OPTIONS: S_BUDAT FOR WA_BSIS-BUDAT,
                    S_AUFNR FOR WA_BSIS-AUFNR DEFAULT '200020',
                    S_BELNR FOR WA_BSIS-BELNR.
    SELECTION-SCREEN: END OF BLOCK B1.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF SCREEN-NAME = 'S_HKONT'.
          SCREEN-INPUT = 0.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    START-OF-SELECTION.
      SELECT MONAT
             HKONT
             BELNR
             BUDAT
             WRBTR
             SHKZG
             SGTXT
             AUFNR
             FROM BSIS
             INTO TABLE IT_BSIS
             WHERE HKONT EQ S_HKONT
             AND   BELNR IN S_BELNR
             AND   BUDAT IN S_BUDAT
             AND   AUFNR IN S_AUFNR.
    *  if sy-subrc <> 0.
    *    message 'No Data' type 'I'.
    *  endif.
      SELECT SUM( WRBTR )
             FROM BSIS
             INTO COLLECT-TOT
             WHERE HKONT EQ S_HKONT
             AND BUDAT < S_BUDAT-LOW
             AND AUFNR IN S_AUFNR.
    END-OF-SELECTION.
      CLEAR: S_BUDAT, S_AUFNR, S_BELNR, S_HKONT.
      LOOP AT IT_BSIS INTO WA_BSIS.
    IF wa_bsis-SHKZG = 'H'.
       wa_bsis-WRBTR = 0 - wa_bsis-WRBTR.
    ENDIF.
        collect-MONAT  = wa_bsis-monat.
        collect-HKONT  = wa_bsis-hkont.
        collect-BELNR  = wa_bsis-belnr.
        collect-BUDAT  = wa_bsis-budat.
        collect-WRBTR  = wa_bsis-wrbtr.
        collect-SHKZG  = wa_bsis-shkzg.
        collect-SGTXT  = wa_bsis-sgtxt.
        collect-AUFNR  = wa_bsis-aufnr.
        collect collect into  collect.
        CLEAR: COLLECT, WA_BSIS.
      ENDLOOP.
      LOOP AT COLLECT.
        AT end of HKONT.
          WRITE:/65 'OpeningBalance',
                 85  collect-tot.
          skip 1.
        ENDAT.
        WRITE:/06 COLLECT-BELNR,
               22 COLLECT-BUDAT,
               32 COLLECT-WRBTR,
               54 COLLECT-SGTXT.
        AT end of MONAT.
          SUM.
          WRITE:/ COLLECT-MONAT COLOR 1.
          WRITE:32 COLLECT-WRBTR COLOR 1.
          VALUE = COLLECT-WRBTR.
          SKIP 1.
        ENDAT.
        VALUE1 = COLLECT-TOT +  VALUE.
        AT end of MONAT.
          WRITE:85 VALUE1.
        ENDAT.
      endloop.
      CLEAR: COLLECT, SUMA, VALUE, VALUE1.
    TOP-OF-PAGE.
      WRITE:/06 'Doc No',
             22 'Post Date',
             39 'Amount',
             54 'Text'.
    Moderator message : See the Sticky threads (related for performance tuning) in this forum. Thread locked.
    Edited by: Vinod Kumar on Oct 13, 2011 11:12 AM

    Hi Ben,
    both BSIS selects would become faster if you can add Company Code BUKRS as 1st field of WHERE clause, because it's the 1st field of primary key and HKONT is the 2nd field of primary key.
    If you have no table index with HKONT as 1st field it's a full database access.
    If possible, try to add BUKRS as 1st field of WHERE clause, otherwise ask for an additional BSIS index at your basis team.
    Regards,
    Klaus

  • Is there any way I can see which of many "reduce noise" is on a clip?

    Hi Guys
    Is there any way I can see which of many "Reduce Noise" actions is on a particular 'shot' from a video clip in my timeline?
    I understand that the entire list of Reduce Noise actions I see are all applied to the entire video clip, except in different areas of the same clip, from which I've extracted various shots. I performed different, specific, Reduce Noise actions all on smaller parts of the clip since some Reduce Noise actions needed to be a bit more tailored than others.
    Under "Actions" on the left I have a list of approx 10 ticked Reduce Noise actions. Is there any way, by clicking on a clip, I can tell which of these specific Reduce Noise actions apply to that particular area of a clip.
    If anyone can help me out I'd really appreciate it.
    Warm regards
    Peter

    You need to explain why it does not work including exact error messages and what version of iphoto the old library is from
    the general answer is that you can not view it using iPhoto - you can convert and open it -  if the old library is from iphoto '08 (version 7.x.x) ore earlier you need to back it up and ad and run the iPhoto library upgrader -  iPhoto '11 or later: About the Library Upgrader - Apple Support - If it is from a newer version or after you run the upgrader then held down the option key while launching iPhoto until the select library window comes up and select the old library from that window to finish the conversion
    Repeat the option = launch to switch back to the current library
    You can use iPhoto Library Manager - http://www.fatcatsoftware.com/iplm/ -  to merge the libraries after they all are for the same version if you want
    LN

  • Is there any way of improving compatibility between ipad 4 and windows xp                                                     p

    is there any way of improving compatibility beween ipad and windows xp

    Hi Smokey0422,
    Although iTunes works with Windows XP, iCloud is not supported - so that does limit the functionality somewhat.
    See the resources for your iPad at the following site:
    http://www.apple.com/support/ipad/
    See the setup instructions below:
    http://www.apple.com/icloud/setup/pc.html
    Cheers,
    Judy

  • HT5429 Map Problem: I can't see the roads in Standard view. Is there any way to improve this serious problem?

    Map Problem: I can't see the roads in Standard view. Is there any way to improve this serious problem?

    Hi Ben,
    both BSIS selects would become faster if you can add Company Code BUKRS as 1st field of WHERE clause, because it's the 1st field of primary key and HKONT is the 2nd field of primary key.
    If you have no table index with HKONT as 1st field it's a full database access.
    If possible, try to add BUKRS as 1st field of WHERE clause, otherwise ask for an additional BSIS index at your basis team.
    Regards,
    Klaus

  • I've copied my itunes library onto an external hard drive.  Is there any way I can do this and delete songs from my PC without also deleting from the external drive? Already lost two songs!!!

    I've copied my itunes library onto an external hard drive.  Is there any way I can do this and delete songs from my PC without also deleting from the external drive? Already lost two songs!!!  I just want a back up - using a work PC and don't want others accessing my songs.  Hope someone can help.  Thanks!

    I see. To get a better idea of what is being stored where please download and run the script iTunesInfo which should output something like this:
    I'm interested in the block of 4 results starting ITL location. If your profile name shows up somewhere replace it with <Name>.  It is also worth checking under Edit > Preferences > Advanced to see where iTunes thinks your media is supposed to go. My script estimates the setting based on the location of the first media file it can actually find.
    tt2

  • I shifted from a windows to a mac.. I want to add songs to my ipod tpuch 4th gen.. but if i try to sync with itunes it says my songs will be replaced by the new songs.. Is there any way that i can have my previous data safe??

    i shifted from a windows to a mac.. I want to add songs to my ipod tpuch 4th gen.. but if i try to sync with itunes it says my songs will be replaced by the new songs.. Is there any way that i can have my previous data safe??

    Your iPod can only be synced with one computer at a time.  If you try to sync it with a new computer/iTunes library, it will replace the contents of the iPod with whatever is in the new library. You should probably disable the autosync functionality first by going to Edit -> Preferences, clicking the Devices tab, and enabling the prevent iPods,iPhones, and iPads from automatically syncing option.
    Before doing anything else,  authorize the new computer with your iTunes Account.  In iTunes, choose Store -> Authorize This Computer and enter in the correct credentials. Either copy a backup file from your old computer to your new one or create a new backup of your iPod in iTunes before letting it sync.
    Then right->click on your iPod Touch from under the Devices section in the left hand pane of iTunes and choose Backup. You might also want to take a look at this article to see what it all included in the backup.
    iOS: How to back up
    Now onto synced content such as music, videos, photos, etc.  For iTunes purchases you can copy them back into iTunes by choosing File -> Transfer Purchases.  For all other nonpurchased iTunes content, see this excellent user tip from another forum member turingtest2 outlining the different methods and software available to help you copy content from your iPod back to your PC and into iTunes.
    Recovering your iTunes library from your iPod or iOS device
    Once the backup has been made and all other synced content such as music, videos, and photos are back in your iTunes library, restore your iPod from that backup you made earlier.  Here is more on backing up and restoring your iPod.
    iTunes: Backing up, updating, and restoring iOS software
    If you do happen to lose any purchased content, you can always redownload it from the iTunes Store again at no cost via iCloud.  See this article for information.
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    B-rock

  • Is there any way to link the individual rows of data to the corresponding bars in a bar chart so that each legend title appears simultaneously with its corresponding bar when creating a build? I can do it in a pie chart but can't in a bar chart.

    Is there any way to link the individual rows of data to the corresponding bars in a bar chart so that each legend title appears simultaneously with its corresponding bar when creating a build? I can do it in a pie chart but can't in a bar chart.

    You used the data.  Verizon can not see what it was sued for.  However your phone can see whats apps used the data.  go to settings-data usage- there will be a place that says data usage cycle.  line the dates up with your cycle.  then there will be a bar graph below that   extend bother white bars one all the way to the left and one all the way to the right.  after those are extended below that will be a list of apps,  there should be one that used over 2 gb and that will show you what app used that data in her purse

  • Is there any way i can transfer all my SMS messages from my 3GS to my 4 ?

    is there any way i can transfer all my SMS messages from my 3GS to my 4 ?

    Use iTunes to backup files from your old ipod first then transfer to the new iPod. Please
    follow the steps in How to transfer your backup from one iOS device to a new device.   By the way, if you don't have the iTunes, you can use this iPhone transfer program. It help you to transfer sms and contacts from iPhone.
    Hope it helps.
    You can use http://www.google.com to search more

  • Is there any way to attach excel insted of XML?

    Hi,
    is there any way to attach excel insted of XML?. i need to fetch the values from the excel sheet directly to the fields in the form.
    For Eg:
    im having 5 fields named  id,name, DOB,country,citizenship
    if i enter the ID, the form should get autopopulate from excel sheet and to display the remaining valus name,dob,country,citizenship.
    excel will look like this
    thanks,
    ramya

    Hi Niall,
    thanks for the reply, right now im attaching the xml in to the form using javascript. im having 5 fields
    my xml looks like this.
    what i need to do is, when i enter 001 in EID field, and enter tab, the other fields like name,sbg,sbu,sbe,country should autopopulate from the xml. plz help me..
    regards,
    ramya.

  • Is there any way for my ipad to piggyback the internet from my iphone when i am not in a wifi area... The guy at the ATT

    Is there any way for my ipad to piggyback the internet from my iphone without having to purchase a "plan" from ATT&T....The guy at the store said that I had to purchase a new plan with "so much" GB per month and loose my unlimited amount that I am grandfathered into with my current plan... any thoughts?

    Unfortuneatly, you would have to give up your unlimited plan. In the US you would have to get the 2GB plan for $25 and add the teathering plan for $20 more.  The teathering plan would give you another 2GB of data for a total 4GB.

  • Is there any way to automate purging Application Logging in azure storage account tables

    is there any way to automate purging Application Logging in azure storage account tables
    Rohit Pasrija

    hi Rohit,
    If you want to delete old data automatically, I think you need develop this feature by yourself. You could code the logic methods on your project, and set a timer to execute the methods to delete old data. Please refer to this thread (http://stackoverflow.com/questions/13602629/is-it-possible-to-acces-a-table-storage-in-azure-from-an-azure-web-site
    ), you could operate table storage data using azure sdk or REST API.
    Please try it.
    Regards,
    Will
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for