MSSQL varchar(max) 50 seconds for one record to insert

120 Views Asked by At

Hi i have a table with field i need to store a text/json/xml into. If i insert just one record with a length of about 20MByte it takes forever about 50 seconds. The table is defined like this

table {
  ID: integer autoincrement primaryindex
  Data: varchar(max)
} 

What can be done to optimize this. I hope to get it to instant inserts

1

There are 1 best solutions below

0
SQLpro On

Have a look over the size of your database files (date and transactions log). You needs to have wide amout of free pages in the files to avoid autoextension that causes time to do so.

A +