EPrints Technical Mailing List Archive
Message: #01301
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] SQl queries
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: [EP-tech] SQl queries
- From: Chris Keene <C.J.Keene@sussex.ac.uk>
- Date: Mon, 12 Nov 2012 13:42:57 +0000
Hi Our mysqld was rather swamped today, when I looked at the queries waiting to run, most were of the form below.
It seems to only select the eprintid, while the where clause itself contains the eprintid it is trying to retrieve, and contains quite a number of sub-select queries.
Is there a reason for these queries (does it confirm the existence / validity of a record by selecting all the relevant sub-tables)?
SELECT `eprint`.`eprintid` FROM `eprint`,
(SELECT `eprint`.`eprintid` AS `eprintid` FROM `eprint`,
(SELECT `eprint`.`eprintid` AS `eprintid`
FROM `eprint`, `eprint_divisions` AS `eprint_divisions`, `subject_ancestors` AS `243327284subject_ancestors`
WHERE `eprint`.`eprintid`=`eprint_divisions`.`eprintid`
AND `eprint_divisions`.`divisions`=`243327284subject_ancestors`.`subjectid`
AND `243327284subject_ancestors`.`ancestors` = 's921'
UNION SELECT `eprint`.`eprintid` AS `eprintid`
FROM `eprint`, `eprint_divisions` AS `eprint_divisions`, `subject_ancestors` AS `243401584subject_ancestors`
WHERE `eprint`.`eprintid`=`eprint_divisions`.`eprintid`
AND `eprint_divisions`.`divisions`=`243401584subject_ancestors`.`subjectid`
AND `243401584subject_ancestors`.`ancestors` = 'd881'
UNION SELECT `eprint`.`eprintid` AS `eprintid`
FROM `eprint`, `eprint_divisions` AS `eprint_divisions`, `subject_ancestors`
AS `243264652subject_ancestors` WHERE `eprint`.`eprintid`=`eprint_divisions`.`eprintid`
AND `eprint_divisions`.`divisions`=`243264652subject_ancestors`.`subjectid`
AND `243264652subject_ancestors`.`ancestors` = 'd2011'
UNION SELECT `eprint`.`eprintid` AS `eprintid`
FROM `eprint`, `eprint_divisions` AS `eprint_divisions`, `subject_ancestors`
AS `243315308subject_ancestors` WHERE `eprint`.`eprintid`=`eprint_divisions`.`eprintid`
AND `eprint_divisions`.`divisions`=`243315308subject_ancestors`.`subjectid`
AND `243315308subject_ancestors`.`ancestors` = 'd2791'
UNION SELECT `eprint`.`eprintid` AS `eprintid`
FROM `eprint`, `eprint_divisions` AS `eprint_divisions`, `subject_ancestors`
AS `243676804subject_ancestors` WHERE `eprint`.`eprintid`=`eprint_divisions`.`eprintid`
AND `eprint_divisions`.`divisions`=`243676804subject_ancestors`.`subjectid`
AND `243676804subject_ancestors`.`ancestors` = 'd2012' UNION SELECT `eprint`.`eprintid` AS `eprintid`
FROM `eprint`, `eprint_divisions` AS `eprint_divisions`, `subject_ancestors`
AS `243713020subject_ancestors` WHERE `eprint`.`eprintid`=`eprint_divisions`.`eprintid`
AND `eprint_divisions`.`divisions`=`243713020subject_ancestors`.`subjectid`
AND `243713020subject_ancestors`.`ancestors` = 'd904' UNION SELECT `eprint`.`eprintid` AS `eprintid`
FROM `eprint`, `eprint_divisions` AS `eprint_divisions`, `subject_ancestors`
AS `243472156subject_ancestors` WHERE `eprint`.`eprintid`=`eprint_divisions`.`eprintid` AND `eprint_divisions`.`divisions`=`243472156subject_ancestors`.`subjectid`
AND `243472156subject_ancestors`.`ancestors` = 'd239')
AS `or_243378268`
WHERE `eprint`.`eprintid`=`or_243378268`.`eprintid`)
AS `and_181190360_0` WHERE `eprint`.`eprintid`=`and_181190360_0`.`eprintid` AND `eprint`.`eprintid` = 41985
GROUP BY `eprint`.`eprintid` Chris Keene - Technical Development Manager, University of Sussex Library
|
- Prev by Date: [EP-tech] Searching by email address
- Next by Date: [EP-tech] epadmin cleanup_cachemaps
- Previous by thread: [EP-tech] Searching by email address
- Next by thread: [EP-tech] epadmin cleanup_cachemaps
- Index(es):