APD Toronto
asked on
SQL SELECT vs DELETE
Hi Experts,
I have a few queries which take suspiciously long to execute, and I'm wondering if these timings are correct or worrisome? I'm using SSMS SQL 2008 R2
SELECT * FROM tblReservations;
Had ~70K Records (can't recall exactly, executed in 0s
SELECT * FROM tblReservations WHERE fldTripType IS NULL;
Had ~10K Records (can't recall exactly), executed in 0s
DELETE FROM tblReservations WHERE fldTripType IS NULL;
Same criteria as llast, after 5 min I went to lunch... came back, see executed in 53min! Why?
SELECT * FROM tblReservations WHERE fldAgent IS NULL;
ONLY 134 Records (can't recall exactly), executed in 0s
DELETE FROM tblReservations WHERE fldAgent IS NULL;
Same criteria as last, after 5 min I stopped execution
So, my question is, are these SELECT vs DELETE execution times normal, due to the fact i had >70K Records, or are they alarming? >5min to delete 134 records?
Thank you.
I have a few queries which take suspiciously long to execute, and I'm wondering if these timings are correct or worrisome? I'm using SSMS SQL 2008 R2
SELECT * FROM tblReservations;
Had ~70K Records (can't recall exactly, executed in 0s
SELECT * FROM tblReservations WHERE fldTripType IS NULL;
Had ~10K Records (can't recall exactly), executed in 0s
DELETE FROM tblReservations WHERE fldTripType IS NULL;
Same criteria as llast, after 5 min I went to lunch... came back, see executed in 53min! Why?
SELECT * FROM tblReservations WHERE fldAgent IS NULL;
ONLY 134 Records (can't recall exactly), executed in 0s
DELETE FROM tblReservations WHERE fldAgent IS NULL;
Same criteria as last, after 5 min I stopped execution
So, my question is, are these SELECT vs DELETE execution times normal, due to the fact i had >70K Records, or are they alarming? >5min to delete 134 records?
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.