BigQuery 返回代码 500:“意外。请重试。”
示例查询:
SELECT IF((bD >= "2013-03-18" AND bD < "2013-03-25"), "2013w12", IF((bD >= "2012-03-19" AND bD < "2012-03-26"), "2012w12", IF((bD >= "2011-03-21" AND bD < "2011-03-28"), "2011w12", ""))) AS pD_pW_T, IF((bD >= "2013-03-18" AND bD < "2013-03-25"), IF(bD > vD, null, (-(2013 - vY))), IF((bD >= "2012-03-19" AND bD < "2012-03-26"), IF(bD > vD, null, (-(2012 - vY))), IF((bD >= "2011-03-21" AND bD < "2011-03-28"), IF(bD > vD, null, (-(2011 - vY))), null))) AS aRD_y, IF((bD >= "2013-03-18" AND bD < "2013-03-25"), IF(bD > vD, null, (-(2013 - vY))), IF((bD >= "2012-03-19" AND bD < "2012-03-26"), IF(bD > vD, null, (-(2012 - vY))), IF((bD >= "2011-03-21" AND bD < "2011-03-28"), IF(bD > vD, null, (-(2011 - vY))), null))) AS aRD_y_name, STRING(SUM(ac)) AS acK_ac_0 FROM tabl.dataset_2009, tabl.dataset_2007, tabl.dataset_2008, tabl.dataset_2013, tabl.dataset_2012, tabl.dataset_2011, tabl.dataset_2010 WHERE (((bD >= "2013-03-18" AND bD < "2013-03-25") OR (bD >= "2012-03-19" AND bD < "2012-03-26") OR (bD >= "2011-03-21" AND bD < "2011-03-28"))) AND (((bD < "2013-03-27"))) AND (ac <> 0) GROUP BY pD_pW_T, aRD_y, aRD_y_name
生产中的代码已经运行了数周。
减少执行查询的表数量似乎有效。