This is a discussion on How stopping and restarting full text indexing? within the SQL Server forums, part of the Microsoft SQL Server category; --> Hi, I've got a full text index which works fine, SQLSERVER2000/WIN 2000 SERVER. The system requires to update indexes ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, I've got a full text index which works fine, SQLSERVER2000/WIN 2000 SERVER. The system requires to update indexes immediately, so I use a timestamp field to enable this. No problems so far. Now, I've got a stored procedures which nearly daily inserts about 10.000 rows. When doing this while full text indexing is active, all users start complaining about performance. In order to work around this problem I tried doing the following ... Create myStoredProcedure -- begin of stored procedure exec sp_fulltext_table 'adsfull', 'stop_background_updateindex' exec sp_fulltext_table 'adsfull', 'stop_change_tracking' -- -- insert 10.000 rows -- -- end of stored procedure exec sp_fulltext_table 'adsfull', 'start_change_tracking' exec sp_fulltext_table 'adsfull', 'start_background_updateindex' Now, it seems this doesn't work. SQL Server keeps tracking changes and updating indexes. Also if I cut away the stop instructions and paste them into query analyzer before starting the stored procedure. So, if I check the status via select fulltextcatalogproperty('FTADS', 'Populatestatus') ... it returns value 6 (incremental in progress) instead of 0 (idle) while executing (0=idle, 1=full population in progress, 6=incremental in progress, 9=change tracking) The only way I can resolve this issue is to stop the indexing via the enterprise manager and to restart after the stored procedure is executed. Any help appreciated. -- Kind regards, Perre Van Wilrijk, Remove capitals to get my real email address, |
| ||||
| "Perre Van Wilrijk" <prSPAM@AkoopjeskrantWAY.be> wrote in message news:Jt6dnU-r0fQBaGXcRVnyuA@scarlet.biz... > Hi, > > I've got a full text index which works fine, SQLSERVER2000/WIN 2000 > SERVER. > > The system requires to update indexes immediately, so I use a timestamp > field to enable this. No problems so far. > > Now, I've got a stored procedures which nearly daily inserts about 10.000 > rows. When doing this while full text indexing is active, all users start > complaining about performance. In order to work around this problem I > tried > doing the following ... > > Create myStoredProcedure > -- begin of stored procedure > exec sp_fulltext_table 'adsfull', 'stop_background_updateindex' > exec sp_fulltext_table 'adsfull', 'stop_change_tracking' > -- > -- insert 10.000 rows > -- > -- end of stored procedure > exec sp_fulltext_table 'adsfull', 'start_change_tracking' > exec sp_fulltext_table 'adsfull', 'start_background_updateindex' > > Now, it seems this doesn't work. SQL Server keeps tracking changes and > updating indexes. Also if I cut away the stop instructions and paste them > into query analyzer before starting the stored procedure. > > So, if I check the status via select fulltextcatalogproperty('FTADS', > 'Populatestatus') ... it returns value 6 (incremental in progress) instead > of 0 (idle) while executing > > (0=idle, 1=full population in progress, 6=incremental in progress, > 9=change > tracking) > > The only way I can resolve this issue is to stop the indexing via the > enterprise manager and to restart after the stored procedure is executed. > > Any help appreciated. > > -- > Kind regards, > Perre Van Wilrijk, > Remove capitals to get my real email address, > > I have no real idea about why your proc isn't stopping the indexing, however if it works from EM then it's possible that EM is doing something extra behind the scenes. It might be worth using Profiler to trace what EM is doing when you stop the indexing, and then copy that in your procedure. You might also want to post to microsoft.public.sqlserver.fulltext to see if someone has a better answer. Simon |