同步報表
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
什麼是同步報表?
同步報表是指必須快速執行的小型報表。收到執行同步報表的要求後,DCM 報表平台會立即開始執行。這類報表最適合用於需要快速取得小量資料的情況,例如在圖形使用者介面中顯示指標。
同步和非同步報表產生作業有何差異?
非同步執行報表至少需要好幾個
就算要求少量資料也沒問題同步報表可更快速地傳回這類資料,但代價是會將報表執行時間的逾時時間設為較低。如果報表無法在同步逾時期間內執行,或是您並未處於時間敏感的環境 (例如使用者介面),則應使用非同步報表產生功能。
同步報表的逾時期限為何?
如果報表很小,可以在 10 秒內執行,系統會將完整的報表檔案傳回初始執行要求。否則,DCM 報表會讓報表執行為期 50 天的報表
逾時。
如果同步報表收到
長短?
如果同步報表的產生作業未在逾時期限內完成,系統會停止產生作業,並將報表轉移至非同步報表佇列。報表不會失敗或傳回錯誤,但進入非同步報表佇列後,報表產生時間至少會延長至幾分鐘。
除了報表產生時間之外,您不會收到報表超出同步報表逾時期限的通知。這項作業會在 50 秒內同步完成,或是變成非同步作業,需要幾分鐘的時間才能完成。
哪些報表類型支援同步執行?
所有報表類型都支援同步執行,但以下類型除外:
其他報表類型都支援同步執行,但如果使用過多資料或資源密集的指標和維度組合,仍會逾時。
如何執行同步報表?
根據預設,所有報表都會以非同步方式執行。要求產生新報表檔案時,您可以將選用的 synchronous
參數設為 true
,要求以同步方式執行報表。請參閱說明文件中的程式碼範例。
是否應該以同步方式來請求所有報表
以及執行方式?
否,只有在預期的情況下,才請求同步執行
逾時期限內要完成的報表如果報表開始了
同步執行時達到逾時限制
會移至非同步佇列 — 該報表
將產生非同步報表所需的時間
同步逾時期限。因此,如果您以非同步方式要求報表,就不會因為同步逾時期間而造成額外延遲。
我要求的指標和維度會影響報表產生時間嗎?
是的。某些指標和維度需要較長的時間
比其他程式碼編譯,部分做法甚至可能會導致同步
設為一律逾時。地理區域維度
有些維度會比過去少見
同步報表。
如何縮短產生報表所需的時間,以便進行同步回報?
許多因素,例如廣告活動的規模和
影響速度。不太瞭解
如要縮小報表範圍
第一步是寫出
你想要快速顯示的內容
然後嘗試縮小報表,直到成功完成為止
同步執行。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-31 (世界標準時間)。
[null,null,["上次更新時間:2025-08-31 (世界標準時間)。"],[[["\u003cp\u003eSynchronous reports are best for retrieving small amounts of data quickly, such as for graphical user interfaces, and have a timeout period.\u003c/p\u003e\n"],["\u003cp\u003eIf a synchronous report takes longer than the timeout period (10 seconds for small reports or 50 seconds otherwise), it automatically switches to asynchronous processing, which takes longer.\u003c/p\u003e\n"],["\u003cp\u003eAll report types support synchronous execution except for the Path to Conversion report and the Floodlight report (with \u003ccode\u003edfa:floodlightImpressions\u003c/code\u003e included).\u003c/p\u003e\n"],["\u003cp\u003eTo run a report synchronously, set the optional \u003ccode\u003esynchronous\u003c/code\u003e parameter to \u003ccode\u003etrue\u003c/code\u003e when requesting report generation.\u003c/p\u003e\n"],["\u003cp\u003eOnly use synchronous execution when you anticipate the report to finish within the timeout period; otherwise, requesting asynchronous execution initially is more efficient.\u003c/p\u003e\n"]]],[],null,["# Synchronous Reports\n\nWhat is a synchronous report?\n-----------------------------\n\nA synchronous report is a small report that must run very quickly.\nUpon receiving a request to run a synchronous report, the DCM reporting\nplatform will begin executing it for you immediately. Reports like these\nare best used in situations where you need a small chunk of data\nquickly, such as when you are displaying metrics in a graphical user\ninterface.\n\nWhat is the difference between synchronous and\nasynchronous report generation?\n------------------------------------------------------------------------------\n\nRunning a report asynchronously will always take at least a few\nminutes, even if you are requesting a small amount of data. Synchronous\nreports return this data much faster at the cost of putting a low\ntimeout on how long the report can take to run. You should use\nasynchronous report generation when the report cannot be run within the\nsynchronous timeout period or when you're not in a time-sensitive\nenvironment such as a user interface.\n\nWhat is the synchronous report timeout period?\n----------------------------------------------\n\nIf the report is small enough to run in 10 seconds or less, the\nsystem will return a complete report file to your initial run request.\nOtherwise, DCM reporting will execute your report for a period of 50\nseconds before timing out.\n\nWhat happens if a synchronous report takes too\nlong?\n----------------------------------------------------\n\nIf the generation of a synchronous report does not complete within the\ntimeout period, the generation is halted and the report fails over into\nour asynchronous reporting queue. Your report will **not**\nfail or return an error, but moving into the asynchronous reporting\nqueue means that your report will now take at least a few minutes to\ngenerate.\n\nYou will receive no indication that your report exceeded the\nsynchronous reporting timeout period other than the report's generation\ntime. It will either complete synchronously in 50 seconds or less or\nbecome asynchronous and require several minutes.\n\nWhich report types support synchronous execution?\n-------------------------------------------------\n\nAll report types support synchronous execution with the exception of:\n\n- The [Path to Conversion report](//support.google.com/dcm/answer/2823644), which never supports synchronous reporting.\n- The [Floodlight report](//support.google.com/dcm/answer/2823790), which only supports synchronous reporting if `dfa:floodlightImpressions` are excluded.\n\n\u003cbr /\u003e\n\nThe other report types all support synchronous execution but will still\ntimeout if too much data or a resource-intensive mix of metrics and\ndimensions are used.\n\nHow do I run a synchronous report?\n----------------------------------\n\nBy default, all reports run asynchronously. When requesting the\ngeneration of a new report file, you can set the optional\n`synchronous`\nparameter to\n`true`\nto request the report be run synchronously. Refer to the [example code](/doubleclick-advertisers/current/reports/run#examples) in our documentation.\n\nShould I request all my reports with synchronous\nexecution?\n-----------------------------------------------------------\n\nNo, you should only request synchronous execution when you expect\nthe report to finish within the timeout period. If your report starts\nwith synchronous execution and hits the timeout limit, the report will\nbe moved to the asynchronous queue---the report's total execution\ntime will be the time required to generate the report asynchronously plus\nthe synchronous timeout period. Thus, if you had requested the report\nasynchronously, you would have avoided the additional delay of\nthe synchronous timeout period.\n\nWill the metrics and dimensions I request affect the\ngeneration time of my reports?\n-----------------------------------------------------------------------------------\n\nYes, they will. Certain metrics and dimensions take longer to\ncompile than others and some of them may even cause your synchronous\nreports to always timeout. Geographical dimensions are one such\ndimension that will rarely, if ever, be fast enough to include in\nsynchronous reports.\n\nHow can I shorten the time needed to generate my\nreports to allow synchronous reporting?\n----------------------------------------------------------------------------------------\n\nMany factors, such as the size of the campaigns included and the\ntimespan that the report covers, affect speed. A bit of manual\ntweaking is often the best way to get your reports down to small enough\nchunks---start with everything you want to be able to display quickly,\nand then try whittling the report down until it successfully completes\nsynchronously."]]