jasteele123

concrete5 MySQL pain

May 29th, 2012
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 1.12 KB | None | 0 0
  1. EXPLAIN SELECT p1.cID, pt.ctHandle FROM Pages p1
  2.  LEFT JOIN Pages p2 ON (p1.cPointerID = p2.cID)
  3.  LEFT JOIN PageTypes pt ON (pt.ctID = (if (p2.cID is null, p1.ctID, p2.ctID)))
  4.  LEFT JOIN PagePaths ON (PagePaths.cID = p1.cID and PagePaths.ppIsCanonical = 1)
  5.  LEFT JOIN PageSearchIndex psi ON (psi.cID = if(p2.cID is null, p1.cID, p2.cID))
  6.  INNER JOIN CollectionVersions cv ON (cv.cID = if(p2.cID is null, p1.cID, p2.cID) AND cvID =
  7.   (SELECT MAX(cvID) FROM CollectionVersions
  8.    WHERE cID = cv.cID)) INNER JOIN Collections c ON (c.cID = if(p2.cID is null, p1.cID, p2.cID))
  9.     LEFT JOIN CollectionSearchIndexAttributes ON (CollectionSearchIndexAttributes.cID = if (p2.cID is null, p1.cID, p2.cID))
  10.     WHERE 1=1 AND p1.cParentID = '0' AND
  11.      (p1.cIsTemplate = 0 OR p2.cIsTemplate = 0) AND
  12.      (p1.cID NOT IN (5,6,7,8,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54,55,65,66,67,68,69) OR
  13.       p2.cID NOT IN (5,6,7,8,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54,55,65,66,67,68,69))
Advertisement
Add Comment
Please, Sign In to add comment