sql - Inserting to TYPE Table is so slow -
i have user define table type stores more 100k rows, when try insert 100k records insertion of data slow. takes me 1 minute before insertion finish. idea how make insertion fast?
--user define table type create type [dbo].[bigintegerlist] table( [id] [bigint] null ) go --sample query declare @data dbo.bigintegerlist insert @data values(1824953) insert @data values(1824954) insert @data values(1824955) insert @data values(1824956) insert @data values(1824996) insert @data values(1824997) insert @data values(1824998) insert @data values(1824999) insert @data values(1825000) insert @data values(1825001) insert @data values(1825002) insert @data values(1825003) insert @data values(1825004) insert @data values(1825005) insert @data values(1825006) insert @data values(1825007) select * @data
why not tag .net?
for insert speed use tvp
maximizing-performance-with-table-valued-parameters
even if not tvp @ least pass multiple values
values (1824953), (1824954)
800 @ time
and need bigint?
Comments
Post a Comment