Hi,
I was wondering how a SELECT query can cause a deadlock. Here is the
error which I am getting sometime:
QL0911N The current transaction has been rolled back because of a
deadlock
or timeout. Reason code "2". SQLSTATE=40001
And the SQL is:
userQuery="export to $outputFileName of del messages $errorFileName
select b.first_name, b.last_name, g.migrated, e.address_line_1, e.address_line_2, e.city, e.state_abbrev, f.state_name, e.postal_code, a.email_address, b.RECEIVE_NEWSLETTER from user_profile b, user a LEFT
OUTER JOIN user_contact c on a.user_id = c.user_id and
c.contact_seq_nbr <= 1 LEFT OUTER JOIN contact d ON c.contact_id = d.contact_id LEFT OUTER JOIN address e ON d.address_id = e.address_id
LEFT OUTER JOIN state f ON e.state_abbrev = f.state_abbrev LEFT OUTER
JOIN user_migration_master g on a.email_address = g.email and
g.migrated = 'Y' where a.user_id = b.user_id and a.email_address is
not null and a.created >= timestamp('$currDate7Days 00:00:00.000') and a.created < timestamp('$currDateGMT 00:00:00.000') and
b.receive_newsletter = 'Y' order by b.first_name"
Thanks in advance!
Sushil Singh
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 85:56:30 |
Calls: | 6,658 |
Files: | 12,203 |
Messages: | 5,333,783 |