Quantcast
Channel: Fórum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15680

SQL Server - inconsistent insert speed, fast then very slow

$
0
0

Hi all,

I'm trying to diagnose a slow insert that I thought I had fixed but the problem is returning intermittently. It's literally a straight insert statement, it runs every evening and inserts around 80,000 rows in a table with 120,000,000. The table is heavily indexed. Sometimes the insert will take under a minute and other nights it will take 15 minutes.

  • There are no triggers on the table.
  • I've verified the database and log have plenty of free space.
  • The primary key is an identity column

I was able to reproduce a slow run of the statement and activity monitor showed the following:

Status: Suspended, Wait Type: PAGEIOLATCH_EX

I tried rebuilding all the indexes with a fill factor of first 90 then 70, but no change.

I'm very confused why it runs so fast some nights and so slow others. I'm open to insights and can provide more detail if necessary.



AS


Viewing all articles
Browse latest Browse all 15680

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>