Remove unnecessary joins
This commit is contained in:
parent
2f7bf480c0
commit
07c450acbf
|
@ -522,8 +522,7 @@ Zotero.Items = new function() {
|
||||||
|
|
||||||
// Then try editors
|
// Then try editors
|
||||||
"CASE (" +
|
"CASE (" +
|
||||||
"SELECT COUNT(*) FROM itemCreators " +
|
"SELECT COUNT(*) FROM itemCreators WHERE itemID=I.itemID AND creatorTypeID IN (3)" +
|
||||||
"NATURAL JOIN creatorTypes WHERE itemID=I.itemID AND creatorTypeID IN (3)" +
|
|
||||||
") " +
|
") " +
|
||||||
"WHEN 0 THEN NULL " +
|
"WHEN 0 THEN NULL " +
|
||||||
"WHEN 1 THEN (" +
|
"WHEN 1 THEN (" +
|
||||||
|
@ -549,8 +548,7 @@ Zotero.Items = new function() {
|
||||||
|
|
||||||
// Then try contributors
|
// Then try contributors
|
||||||
"CASE (" +
|
"CASE (" +
|
||||||
"SELECT COUNT(*) FROM itemCreators " +
|
"SELECT COUNT(*) FROM itemCreators WHERE itemID=I.itemID AND creatorTypeID IN (2)" +
|
||||||
"NATURAL JOIN creatorTypes WHERE itemID=I.itemID AND creatorTypeID IN (2)" +
|
|
||||||
") " +
|
") " +
|
||||||
"WHEN 0 THEN NULL " +
|
"WHEN 0 THEN NULL " +
|
||||||
"WHEN 1 THEN (" +
|
"WHEN 1 THEN (" +
|
||||||
|
|
Loading…
Reference in New Issue
Block a user