From: BlueSky on
Recently, i have been looking for ways to optimize Sharepoint's performance
on my SQL Server. I noticed that a particular statement was creating a lot
of waits and it was:

insert bulk dbo.MSSSessionExistingDocs("DocId" int)

I caught that in the Profiler via "SQL:StmtCompleted/Started".

Can someone tell me what the statement is doing? I do not recognize its
syntax.
Thanks.
--
The Spirit gives life; the flesh counts for nothing! (Jn 6:63)
From: Erland Sommarskog on
BlueSky (BlueSky(a)discussions.microsoft.com) writes:
> Recently, i have been looking for ways to optimize Sharepoint's
> performance on my SQL Server. I noticed that a particular statement was
> creating a lot of waits and it was:
>
> insert bulk dbo.MSSSessionExistingDocs("DocId" int)
>
> I caught that in the Profiler via "SQL:StmtCompleted/Started".
>
> Can someone tell me what the statement is doing? I do not recognize its
> syntax.

This is a bulk-load operation, initiated by one of BCP (Command Line),
BULK INSERT (T-SQL), OPENROWSET(BULK) (T-SQL) or SqlBulkCopy (ADO .Net).

Bulk-loads are typically used for loading lots of data from file or
other external sorce.


--
Erland Sommarskog, SQL Server MVP, esquel(a)sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx