December 10, 2018 at 7:56 am
Sean Redmond - Monday, December 10, 2018 6:07 AMI'm preparing a pilot-study on Full-Text Search and this script will go part of the way towards it. The extended procedure master.dbo.xp_DirTree will be useful anyway.
The aim is to see how useful it might be in storing some/many/all of the company's office-documents, saved scripts and PDFs.FTS can read & index LOBs with the help of iFilters although Jeff's comment about LOBs being the wrong way to do things is a tad worrying. I am expecting the DB to grow big quickly and one of the aims of the pilot study is to see what exactly the resource requirements are.
If you must load LOBs, make sure that you've used set the table option to store the LOBs out of row. I've recently done some testing that shows (at least for the test data I built) that INSERTs of LOBs with that option turned on make the INSERTs about 19.6% faster and it doesn't hurt reads either. It fact, it makes the reads of the LOB data (I used a LIKE search) an average of 3.9% faster for the test data I used.
Of course, forcing LOBs to be out of row so that the stuff that could fit won't end up in-row will also help your non-LOB selects sing because they won't have to read larger unused LOB data. As a bit of a sidebar and major benefit, the option also took the Clustered Index rebuilds for the test data I used down from 7500 milliseconds down to 185 milliseconds not to mention the huge savings in Logical Reads for queries that don't address the LOB data.
Here's the code to set the option for a given table.EXEC sp_tableoption 'dbo.SomeTable','large value types out of row',1;
Please DO read up on the use of sp_tableoption for tables that already have data in them. There are extra steps required to force existing in-row lobs out-of-row. (An "in-place" update must be done).
--Jeff Moden
Change is inevitable... Change for the better is not.
December 10, 2018 at 8:12 am
Hi Jeff,
I will indeed read up on it.
Thanks for the very prompt reply,
Sean.
December 10, 2018 at 8:42 am
You're welcome. I also neglected to state that the test data consisted of 1 million rows with 2 non-LOB columns and 1 VARCHAR(MAX) column and total table size was 572MB. It was a very simple proof-of-principle test.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 16 through 17 (of 17 total)
You must be logged in to reply to this topic. Login to reply