SQL 2008 Full Text CONTAINSTABLE is VERY SLOW

Hello, 
I am running SQL Server 2008 SP3.
I know I am not the only to have SQL Server CONTAINSTABLE query performances issues. However I think mine is very strange because it appears that the SAME IDENTICAL query produces completely different execution plans on two different sessions against
the same SQL Server/database.
This is the query:
select * from CONTAINSTABLE (TABChiamate,[Domanda],N'"dn"', 20)
My full text index has been completely rebuilt and it contains 1 million of rows.
What is strange about this query is that on the session where it works fine it runs in a fraction of a second, whereas on another session it's REALLY slow - taking 20/30 seconds to run (or minutes, depending on the top_n parameter).
Looking at the execution plans I see that the slow one is doing a TABLE/LAZY SPOOL on 741.000 rows, which making both CPUs of the server spin to 100% for the execution time (20/30 seconds). Obviously this is unacceptable since we have about one hundred of
users that could perform the same query in the same minute and I can't have 100 cores to complete the operation right?
However, I am not able to understand why this issue is strictly related to the Session... new sessions are running fine... 
Anyone could help trying to figure out what to look for to explain this strange behavior? I tried to see all SET options to understand if they are different ... now my question is ... is it possible that execution plans are cached in a per-session basis?
Thank you in advance!
Adriano

Hi RFL, thank you for your reply! I try to answer your questions below.
Adriano,  A few comments and questions.
1. What build level of SQL Server 2008 are you running?
Microsoft SQL Server 2008 (SP3) - 10.0.5500.0 (X64)   Sep 21 2011 22:45:45   Copyright (c) 1988-2008 Microsoft Corporation  Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (VM)
2. Your example query is apparently not identical to the two plans in the screen shots.  Could you share two runs of the restricted query?
I just retried the same today and it appears to work correctly... however the main issue is that I am sure I'll face the issue in the next weeks as soon as the full text index will need a rebuild ... :-(
3. How many rows do the unlimited searches return?
127 rows.
4. Is the first query in the set always the slow one?  Or, if you switch them around does slow query remain the same?
If you look at the execution plans above, the executed query is the same on 2 connections. I copied/pasted the same query, and on the first query window it was REALLY slow, putting both CPUs at 98% for many seconds/near a minute.
There was a bug reported here with optimization, SQL Server 2008, and Containstable.  I cannot tell if the problem is identical to yours, but if you have not updated SQL Server 2008 since mid-2009 you might check for the fix to the following problem:
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/003bb682-a7d2-489d-ad0f-123a8206b663/fulltext-search-containstable-near-broken-in-sql-server-2008?forum=transactsql
I've seen, but it seems not my case (I've SP3 and still having issues).
This morning I've seen that the query analyzer window got the connection broken, and I needed to reconnect. After reconnecting the same query window, the query went fast... but I am not able to understand WHY, it looks like the "bad plan"
was cached on the actual connection/process for some reason, and after a timeout it has been recalculated on the rebuilt full-text index... and actually now it works... but I am sure the issue will come back again in some days/week...
RLF
Adriano

Similar Messages

  • After closing large documents (drawings) the window closes but the process runs still in the background. I open the next document, the same procedure and after dowing this several times the RAM is full the system becoms very slow. what can i do???

    after closing large documents (drawings) the window closes but the process runs still in the background. I open the next document, the same procedure and after dowing this several times the RAM is full the system becoms very slow. what can i do???

    You can always shut it down manually via the Task Manager
    (CtrlShiftEsc)...
    On Mon, Sep 1, 2014 at 3:05 PM, frank koethen <[email protected]>

  • SQL/MM Full Text

    hello all,
    I want more informations about SQL/MM Full Text for Oracle Text. i dont find the package witch implemente this standard.
    thanks

    Fatima,
    I'm not finding any direct reference to SQL/MM Part 2 Full Text in anything that I have either, but you can do full text searches with Oracle Text. On a quick look through the standard I really don't see much that cannot be done with Oracle Text, though its method of implementation might differ from what you are expecting (I don't know that - just an assumption based on your question).
    Please specify your requirement here and we can tell you if it can be done or not and point you to the docs that discuss the implementation.
    Thanks,
    Ron

  • Microsoft SQL 2k5 / full text indexing

    I'm pretty sure I know the answer to this but would like to get some confirmation. I have Stellent 7.5.1; Microsoft SQL 2k5 server and Verity. Should full text indexing be checked or unchecked in Sql?
    Thanks

    The following thread is on the topic of SQL Azure full text indexing not being available:
    http://social.msdn.microsoft.com/Forums/windowsazure/en-US/aefcea67-4c9b-4dff-b480-925a32431bcc/sql-azure-fulltext-indexes?forum=ssdsgetstarted
    Workaround solution:
    How to Use Lucene.NET with Windows Azure SQL Database
    QUOTE: "Summary
    Lucene.NET is a .NET implementation of the Lucene full-text search engine. This article describes how you can use Lucene.NET to index text data stored in Windows Azure SQL Database, and then perform searches against that data.
    NOTE: This does not provide an integrated full-text search experience like the full-text search in SQL Server. Lucene.NET is an external process that is queried separately from SQL Database.
    NOTE: This article relies on the Azure Library for Lucene.NET (https://azuredirectory.codeplex.com/
    ) to store the Lucene.NET catalog in
    a Windows Azure storage blob.
    Kalman Toth Database & OLAP Architect
    Free T-SQL Scripts
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Full Text searching number is slow

     Hi
      I configure the Full text search
    some words like '  c\s full  , m\s xxxxx   like this because of  \  it is not searching... if i replace to '' it is not searching the word that i require.
    if i search the words that have number 432323XXX these words search are very slow
    Please help
    Thanks & Regards Manoj

    Hi Manoj,
    The performance of full-text queries could be influenced by various factors, such as memory, disk speed, fragmented catalog and so on. To improve the performance of full-text queries, please consider the following things.
    • Reduce the number of fragments, reorganize the full-text catalog by using the REORGANIZE option of the ALTER FULLTEXT CATALOG Transact-SQL statement.
    • Limit results and increase performance by using the top_n_by_rank parameter of the FREETEXTTABLE and CONTAINSTABLE functions.
    • Check the full-text query plan to make sure that the appropriate join plan is chosen.
    For more details, please review the following link.
    http://msdn.microsoft.com/en-us/library/cc879244.aspx
    Thanks,
    Lydia Zhang

  • Memory full with nothing running, very slow

    Our macbook suddenly started running very slow and having programs freeze a lot after a partial migration form a power PC G5.  In short it happens in two different accounts.  Activity monitor shows the cpu is not doing much (idle > 70%) but the memory is very full even when only activity monitor has launched.
    Is it right for activity monitor to be showing almost all of the 1 GB used (0.78GB) immediately after a restart with only activity monitor running (see image).  I don't know what most of these things are.  CPU usages was very low.  launch program takes a long time, switching between programs, pretty much anything between programs, saving, or launching.  Also programs (at least firefox and power point which I use alot) freeze frquently.  (What I have tried is listed below).  Yes I have ordered more memory but that doesn't address the issue that this was working fine before.  Once  much is launched the memory use is essentially 100%
    The cause:  macbook had been working fine with several user accouts and normal operation.  We had used it since "mid 2007".  Our old G5 is dying (video card I believe).  So I did a partial migration using the firewire migrate in the OS.  I migrated my account and then separately migrated some of the applicaitons.  I also started using Outlook and set up all my email accounts in it.  What should the activity look like?
    0
    Tried:  repair disk - no problems  The HD was replaced 12/12/2008,  repaired disk permisions
    reinstall snow_leapard from original disk 10.6.3 - same symptoms,  updated through software update to 10.6.8  - no change.
    not much on login launch.  other account has less and also slow.

    Kappy's Personal Suggestions for OS X Maintenance
    For disk repairs use Disk Utility.  For situations DU cannot handle the best third-party utilities are: Disk Warrior;  DW only fixes problems with the disk directory, but most disk problems are caused by directory corruption; Disk Warrior 4.x is now Intel Mac compatible. TechTool Pro provides additional repair options including file repair and recovery, system diagnostics, and disk defragmentation.  TechTool Pro 4.5.1 or higher are Intel Mac compatible;  Drive Genius is similar to TechTool Pro in terms of the various repair services provided.  Versions 1.5.1 or later are Intel Mac compatible.
    OS X performs certain maintenance functions that are scheduled to occur on a daily, weekly, or monthly period. The maintenance scripts run in the early AM only if the computer is turned on 24/7 (no sleep.) If this isn't the case, then an excellent solution is to download and install a shareware utility such as Macaroni, JAW PseudoAnacron, or Anacron that will automate the maintenance activity regardless of whether the computer is turned off or asleep.  Dependence upon third-party utilities to run the periodic maintenance scripts had been significantly reduced in Tiger and Leopard.  These utilities have limited or no functionality with Snow Leopard or Lion and should not be installed.
    OS X automatically defragments files less than 20 MBs in size, so unless you have a disk full of very large files there's little need for defragmenting the hard drive. As for virus protection there are few if any such animals affecting OS X. You can protect the computer easily using the freeware Open Source virus protection software ClamXAV. Personally I would avoid most commercial anti-virus software because of their potential for causing problems.
    I would also recommend downloading the shareware utility TinkerTool System that you can use for periodic maintenance such as removing old log files and archives, clearing caches, etc.  Other utilities are also available such as Onyx, Lion Cache Cleaner, CockTail, for example.
    For emergency repairs install the freeware utility Applejack.  If you cannot start up in OS X, you may be able to start in single-user mode from which you can run Applejack to do a whole set of repair and maintenance routines from the commandline.  Note that AppleJack 1.5 is required for Leopard. AppleJack 1.6 is compatible with Snow Leopard. There is no confirmation that this version also works with Lion.
    When you install any new system software or updates be sure to repair the hard drive and permissions beforehand. I also recommend booting into safe mode before doing system software updates.
    Get an external Firewire drive at least equal in size to the internal hard drive and make (and maintain) a bootable clone/backup. You can make a bootable clone using the Restore option of Disk Utility. You can also make and maintain clones with good backup software. My personal recommendations are (order is not significant):
    Backuplist
    Carbon Copy Cloner
    Data Backup
    Deja Vu
    iBackup
    JaBack
    Silver Keeper
    MimMac
    Retrospect
    Super Flexible File Synchronizer
    SuperDuper!
    Synchronize Pro! X
    SyncTwoFolders
    Synk Pro
    Synk Standard
    Tri-Backup
    Visit The XLab FAQs and read the FAQs on maintenance, optimization, virus protection, and backup and restore.
    Additional suggestions will be found in Mac Maintenance Quick Assist.
    Referenced software can be found at CNet Downloads or MacUpdate.

  • Pages with many text hyperlinks are very slow

    When making a text list, where a lot of the words are hperlinks, the resulting age is very slow with loading.
    Also, especially when not using Safari, the screen is garbled with text until the complete page is loaded.
    It looks like all those simple text hyperlinks are somehow displayed as pictures???
    How can I create plain text hyperlinks without all the overhead added by iWeb?

    I have converted a list to web => Times New Roman => bolt and regular, but still the same problem.
    In the source code this list is build by using img usemap, see part of the code here:
    test1
    test2
    ....cut
    The solution looks like to recreate all the lists
    I will post the result when I have recreated one of the lists.

  • SQL Developer in CITRX environment get very slow

    All,
    running version 3.0.02 BuildMAIN-02.37 of SQL Developer on a CITRIX machine.
    We installed that software a while ago and it got very slow. When I ran an SQL statement it took seconds to get the cursor back.
    When I deleted the profile on CITRIX for my user it went back to normal.
    Did anyone experience the same?
    Any remedy?
    Please let me know if you need more details.
    Thank you,
    André

    ok - I see three options:
    1. submit an enhancement request to add such a filter
    2. don't use sql dev for the 'diff' project - do it manually
    3. use a workaround process
    For options #2 or #3 you need to repost a related, but similar, question in the database general forum.
    General Database Discussions
    This would be my recommendation:
    1. Use EXPDP to export the metadata only for the databases you want to work with
    2. Use IMPDP to import that metadata on a server/DB dedicated to your DIFF needs
    3. Use a simple script/procedure to drop users that have no objects (easier than trying customize the import)
    4. Use Sql Dev on the resulting DIFF server/DB
    You can easily export only the metadata. Then just import it somwhere where you can drop what you don't need. Sql Dev can then handle the rest for you.
    Sure - it requires a second DB or two but those will be TINY since you won't have ANY data at all; just the code.
    It also gives you a great sandbox to test any scriptss you might want to execute to make two schemas equal.
    I won't follow up at all on the above in this forum. If you want more help with a workaround repost an appropriate question and provide a link to this thread in it.
    I suggest
    With the requisite licensing you can use Oracle's DBMS_METADATA_DIFF package to do your own comparisons.
    http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_metadiff.htm#CHEGJBCA

  • SQL query with parallel hint  running very slow

    I have a SQL query which joins three huge tables. (given below)
         insert /*+ append */ into final_table (oid, rmeth, id, expdt, crddt, coupon, bitfields, processed_count)
         select /*+ full(t2) parallel(t2,31) full(t3) parallel(t3,31)*/
         seq_final_table.nextval, '200', t2.id, t3.end_date, '1/jul/2009',123,t2.bitfield, 0
         from table1 t1, table2 t2, table3 t3 where
         t1.id=t2.id and
         t2.pid=t3.pid and
         t2.vid=t3.vid and
         t3.end_date is not null and
         (trunc(t1.expiry_date) != trunc(t3.end_date) or trim(t1.expiry_date) is null);
         Below are some statistics of the three tables.
         Table_Name          RowCount    Size(MB)
         table1 36469938 532
         table2 242172205     39184
         table3 231756758     29814
         The above query ran for 30+ hours, and returned with no rows inserted into final_table. I didn't get any error message also.
         But when I ran the query with table1 containing just 10000 records, the query completed succesfully within 20 minutes.
         Can any one please optimize the above query?
    Edited by: jaysara on Aug 18, 2009 11:51 PM

    As a side note: You probably don't want to insert a string into a date field, won't you?
    Under the assumption that crddt is of datatype date:
    crddt='1/jul/2009' needs to be changed into
    crddt= to_date('01/07/2009','dd/mm/yyyy') This is data type correct and nls independent.

  • Viewing full screen images gets very slow in PSE 5&6

    In full screen preview mode, when going from a horizontal image to a vertical image, it takes several seconds to go to the next image.Have tried turning off and on the resizing option and it had no effect. Viewing 2mb jpgs from a Nikon D200.Have Win XP 64, 8GB Ram, dual core processor and a middle of the road video card.
    Could this be a video card issue? Would going to PSE 8 help. does PSE 8 utilize 64 bit OS?

    Very interesting.  I'm guessing that the portrait photos were rotated by the camera by setting the Orientation field in the photos' metadata, and that for some reason, PSE on your system requires a lot of time to properly rotate them on the fly in Full Screen view.  When you edit the photo in the Editor, it rotates the actual image, rather than setting the Orientation field.
    For a couple of test photos, try following steps 1 - 3 of this FAQ:
    http://www.johnrellis.com/psedbtool/photoshop-elements-faq.htm#_Photos_not_properly
    This should have the same effect as editing them in the Editor.

  • Sql 2008: enlarging text display in Results pane.....

    Is it possible to enlarge the text displayed in the Results pane? (useful when viewing on an overhead projector)
    edm2
    *** Just figured it out. Under SSMS, Tools > Options > Environment > Fonts and Colors > Grid Results (under Show settings for drop down), type desired font size but then you must close and reopen SSMS. Closing the query editor pane itself is not
    enough

    Here is the Grid Results font setting panel:
    Kalman Toth Database & OLAP Architect
    SELECT Video Tutorials 4 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Text makes illu very slow

    Using the text tool i created text blocks and pasted text, about 100 words and now when trying to type in there more text or make changes it takes for ever!
    Im using a dual 1.8 G5, OSX 10.4.11, 3GB RAM. i think i should be encountering such issues, machine is fast enough at least for such simple tasks.
    Can it be that illustrator cant handle such large texts? But then again whats the text chain feature for? Or might it be a problem regarding some illustrator setting?

    OK Doug that's it we're taking this outside...I'll give you FreeHand alright!
    Justy joking! I didn't frighten you did I?
    If you had noticed from the past postings this is an issue I have had withthe Illustrator team and have constantly been reporting difficulties. Look how long it took toget the soft return to work and if one creates a text frame with columns you can not nacigate to the next column. The problems with Justified text as well.
    The concept that there cannot be a shared type engine in all of the adobe applications is very strange.
    You should be able to drag and drop paragraphs as point or area text from any of the apps with everything working as expected.
    Any feature that cannot work in an application say as with Dreamweaver should eityher be grayewd out or offer a warning and instructions.
    All settings on text should be shown in the applications effects panel and all apps should have live effects.
    All text and paragraph styles should be live effects to be turned on and off at will.
    No reason to ever permanently changew the default settings for text it should all be tool for repurposing your art and layout.
    Even tabs.
    This has to change. You can do it in Illustrator to some degree and though it is the weakest link it now has the foundation for really powerful text handling feature now that you can turn on and off effects in the appearance panel.
    There is no reason any more that the paragraph character styles panels be used once a style is applied. The effects panel should take care of that task with a wink of an eye.
    If you want to transform text use the effects and not the transform tool it has to go.
    And everyone has to put the screws to Adobe on this. When I get back I will put in anopther more comrehensive feature request I encourage everyone to do so especially Gary and James who Adobe are more likely to listen to then perhaps me!
    It would be great if we actually get5 them to change this next time out.

  • Hard drive is only 1/2 full, but computer runs very slow.  Is there a defrag function like on a PC?

    MacBook Pro (13-inch, Early 2011)

    Please describe the problem in as much relevant detail as possible. The better your description, the better the chance of a solution.
    For example, if the computer is slow, which specific actions are slow? Is it slow all the time, or only sometimes? What changes did you make, if any, just before it became slow? Have you seen any alerts or error messages? Have you done anything to try to fix it? Most importantly, do you have a current backup of all data? If the answer to the last question is "no," back up now. Ask if you need guidance. Do nothing else until you have a backup.

  • 2008 macbook pro is running very slow.

    Even simple things like trying to change a font in excel cause the spinning wheel to display before the font selection becomes visible.
    Any suggestions to resolve this?  I have over 40gb of storage available and 4gb of memory.

    Look for help here:
    https://discussions.apple.com/docs/DOC-3521
    Ciao.

  • Live Text Template - Very slow to update

    Started using Live Text Templates which in theory seem really great but they are SOOOOO slow to update.
    So I create a simple 5 sec title with two text elements which simply fade in at the start and fade out at the end. The back ground is plain colored shape.
    I put this in to premiere, open it in the source panel and update my two text elements
    I put this title into an empty timeline - if I move the play head over the clips in the timeline it can take up to 60 seconds before the clip shows the correct text
    I then change the text in the master clip (title).
    Going back to the time line it takes about 1-2 minutes before I can view the changes in the timeline - either by just putting the playhead over the clip or actually playing the timeline. It will either show a black frame or the previous text.
    If the sequence contains other content then after changing text in the master clip the whole timeline will just show a black frame in the program panel for about 30-60 seconds then I can view this other content but have to wait a further 30-60 seconds before I see the updated title text.
    Its very slow and far from live. Anyone know if there is something I can change somewhere to speed this up? What is happening behind the scenes to allow Premiere to effectively render out this titles? If I actually render the title in the timeline it only take a few seconds so no reason it should take so long for Premiere to do it in the background.

    Good question that I ask myself also, but not just updating Titles. Same time lag for updating a Photoshop image that sits inside Premiere, or updating an After Effects composition inside Premiere.
    Sometimes I think I can 'trick it' into speeding up by 'saving' the Premiere project, but then most times I think I am tricking myself.

Maybe you are looking for

  • Is my apple id the same for my i phone and i pod?

    When trying to download apps, it says that my apple id and password don't match. I just changed it on i tunes I thought it was the same account?

  • Last use of RMI object instance

    I have an RMI object with instance variables. As clients of this remote object method make calls on it, these instance variables are used and modified. My question is; Is there a way where I can check when the last call from the client where made usi

  • Multiple dimensions from single logical table

    Hi, I cannot seem to create multiple dimensions based one one single logical table. For example, I have a Time table from which I'd like to create a calendar time dimension and a fiscal time dimension. However, as soon as one dimension is created, I

  • Is it possible to bypass iDVD?

    I, too, have the problem of iDVD freezing when I try to burn a DVD. I have a move I completed in iMovie, it has everything I want in it, so I don't need anything extra from iDVD. I tried exporting it to the desktop as a Large file and using the File

  • Serial Nos while doing PGI in the Delivery

    Hi Everyone, Please guide me for the following query: After selecting an item line and then clicking on option for Serial No. on the screen, no screen is being appeared for entering the Serial Nos. Note: The Material is a serialized material. Please