MySQL errors
Permalink
My site has moved (lots of my sites have moved but this one is causing a real problem). After copying all the files and uploading the database I get this error below. Any ideas how I might fix this, if I refresh the database I can get rid of the errors but there is loads of data missing. Thanks in advance
mysql error: [1104: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay] in EXECUTE("select p1.cID, pt.ctHandle ,event.eID as eID, event.date AS eventdate, event.sttime AS eventstart, event.entime AS eventend from Pages p1 left join Pages p2 on (p1.cPointerID = p2.cID) left join PageTypes pt on (pt.ctID = (if (p2.cID is null, p1.ctID, p2.ctID))) left join PagePaths on (PagePaths.cID = p1.cID and PagePaths.ppIsCanonical = 1) left join PageSearchIndex psi on (psi.cID = if(p2.cID is null, p1.cID, p2.cID)) inner join CollectionVersions cv on (cv.cID = if(p2.cID is null, p1.cID, p2.cID) and cvID = (select cvID from CollectionVersions where cvIsApproved = 1 and cID = cv.cID)) inner join Collections c on (c.cID = if(p2.cID is null, p1.cID, p2.cID)) left join CollectionSearchIndexAttributes on (CollectionSearchIndexAttributes.cID = if (p2.cID is null, p1.cID, p2.cID)) left join btProEventDates event on p1.cID = event.eventID left join btProEventDatesExclude excluddates on event.eID = excluddates.eventID where 1=1 and cvIsApproved = '1' and (p1.cIsTemplate = 0 or p2.cIsTemplate = 0) and p1.cIsActive = '1' and (p1.cIsSystemPage = 0 or p2.cIsSystemPage = 0) and excluddates.eeID IS NULL and DATE_FORMAT(CONCAT_WS(' ', event.date, event.sttime),'%Y-%m-%d %H:%i:%s') > '2012-09-25 23:11:12' and (ak_event_category LIKE '% Year 9 %' OR ak_event_category LIKE '% School event %') order by eventdate asc, eventstart asc limit 0,3 ")
mysql error: [1104: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay] in EXECUTE("select p1.cID, pt.ctHandle ,event.eID as eID, event.date AS eventdate, event.sttime AS eventstart, event.entime AS eventend from Pages p1 left join Pages p2 on (p1.cPointerID = p2.cID) left join PageTypes pt on (pt.ctID = (if (p2.cID is null, p1.ctID, p2.ctID))) left join PagePaths on (PagePaths.cID = p1.cID and PagePaths.ppIsCanonical = 1) left join PageSearchIndex psi on (psi.cID = if(p2.cID is null, p1.cID, p2.cID)) inner join CollectionVersions cv on (cv.cID = if(p2.cID is null, p1.cID, p2.cID) and cvID = (select cvID from CollectionVersions where cvIsApproved = 1 and cID = cv.cID)) inner join Collections c on (c.cID = if(p2.cID is null, p1.cID, p2.cID)) left join CollectionSearchIndexAttributes on (CollectionSearchIndexAttributes.cID = if (p2.cID is null, p1.cID, p2.cID)) left join btProEventDates event on p1.cID = event.eventID left join btProEventDatesExclude excluddates on event.eID = excluddates.eventID where 1=1 and cvIsApproved = '1' and (p1.cIsTemplate = 0 or p2.cIsTemplate = 0) and p1.cIsActive = '1' and (p1.cIsSystemPage = 0 or p2.cIsSystemPage = 0) and excluddates.eeID IS NULL and DATE_FORMAT(CONCAT_WS(' ', event.date, event.sttime),'%Y-%m-%d %H:%i:%s') > '2012-09-25 23:11:12' and (ak_event_category LIKE '% Year 9 %' OR ak_event_category LIKE '% School event %') order by eventdate asc, eventstart asc limit 0,3 ")
I'm sure there was a quicker way as 7 hours was a slog.