2
我在下面的SQL查詢遇到問題......它釘住了我的服務器上的CPU並最終超時而不返回結果。查詢的格式是否正常?MySQL查詢超時
BD
SELECT dfa_data_dump.date,
campaignname,
placementgroup,
placementstartdate,
placementenddate,
placementgrouptotalbookedunits,
placementgroupid,
sitename,
dfa_data_dump.placementid,
placement,
dfa_data_dump.placementrate,
placement_rates.ratetype,
placementtotalbookedunits,
placementsize,
time_dimension.month,
Sum(impressionsdelivered),
Sum(clicksrecorded),
Sum(totalactivities),
Sum(totalcost)
FROM dfa_data_dump
INNER JOIN time_dimension
ON time_dimension.date = dfa_data_dump.date
INNER JOIN placement_rates
ON placement_rates.placementid = dfa_data_dump.placementid
GROUP BY dfa_data_dump.date,
campaignname,
placementgroup,
placementgrouptotalbookedunits,
placementgroupid,
sitename,
placementid,
placement,
placementrate,
placementtotalbookedunits,
placementsize,
time_dimension.month
您需要提供更多信息。你的表結構是什麼樣的?指標?你能提供一個DESCRIBE結果嗎?這可能是需要時間的分組和聚合。 – alexn