public inbox for [email protected]  
help / color / mirror / Atom feed
From: Bart Jonk <[email protected]>
To: [email protected]
Subject: Insert fails. TRUNCATE process takes long
Date: Wed, 22 Jan 2025 11:00:36 +0100
Message-ID: <CANEeCvxFYeU+FZJ1_KVi9PMMiW65=NpD32P_0NzP1i+V_VRb6g@mail.gmail.com> (raw)

Last night we had a scheduled script that was ended by `statement_timeout`
setting. It took hours instead of seconds. The script is normally inserting
1M records (1.028.563), in seconds.
insert happens after a truncate of the table.


This morning we tried restarting the script. checked for locks first. No
locks, however same issue. Process hangs.

We rebooted the db server. and now did two things.

1) for safety we tried to truncate the table again (while already empty,
confirmed with select *)

The truncate returned with success (according to ODBC), however, the
process keep running:
[image: image.png]

2) in spite of that. we decided to restart the script. insert succeeded.


Not sure what happened / is happening, It's very hard to find an
explanation on-line.

What can we do to prevent this happening again?


Kind regards,

Bart Jonk

Voys

You can call me on +31 6 1008 4361

Or email me at [email protected]


Attachments:

  [image/png] image.png (35.2K, 3-image.png)
  download | view image

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Insert fails. TRUNCATE process takes long
  In-Reply-To: <CANEeCvxFYeU+FZJ1_KVi9PMMiW65=NpD32P_0NzP1i+V_VRb6g@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox