サイズの大きなレポートを作成する
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
AdSense Management API のレポートの長さはデフォルトで最大 100,000 行です。もし
データの処理中にパフォーマンスの問題が発生した場合
役に立つヒントをいくつか紹介します。
レポートの規模を縮小する
レポートのサイズを小さくする場合、まず確認するディメンションのリストは
使用法ディメンションを 1 つ追加するごとに、返される行の数に相乗効果があります。確認事項
必要なディメンションのみを追加するだけです。
レポートの分割
非常に正確なデータのみが必要で、それ以外は
細かい部分まで減らすことができますたとえば、以前のタスクについて、非常に正確な詳細情報
国別およびチャネル別に日別の統計情報が表示されますが、
国単位のデータがない、ということですそのため、このセグメントで複雑なレポートを作成して、
それ以前についてはもっと単純です
CSV に切り替えて JSON 解析を回避する
AdSense Management API を使用すると、通常の JSON 形式ではなく CSV 形式でレポートを受け取ることができます。
そのためには、別の generateCsv メソッドを呼び出します。
例
DATE,CLICKS
2014-01-01,2
2014-01-02,1
2014-01-03,4
2014-01-04,1
2014-01-05,1
次のステップ
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[[["\u003cp\u003eAdSense Management API reports have a default maximum length of 100,000 rows, and exceeding this limit may cause performance issues.\u003c/p\u003e\n"],["\u003cp\u003eMinimizing the number of dimensions used in a report can significantly reduce its size and improve performance.\u003c/p\u003e\n"],["\u003cp\u003eFor reports requiring varying levels of granularity, consider splitting them into multiple reports with different dimension sets to optimize data retrieval.\u003c/p\u003e\n"],["\u003cp\u003eSwitching from JSON to CSV format for report retrieval can avoid JSON parsing overhead and improve efficiency.\u003c/p\u003e\n"]]],["To manage large AdSense reports, reduce the scale by minimizing the number of dimensions used, as each dimension increases rows. Split reports into detailed and less detailed sections based on data accuracy needs. For improved performance, switch from JSON to CSV format by using the `generateCsv` method. Consider batching and optimizing dimension usage for further improvements.\n"],null,["# Run Large Reports\n\nReports have a maximum length of 100,000 rows in the AdSense Management API, by default. If you're\nrunning close to these limits, or running into performance issues while processing the data, here\nare some tips that may help.\n\nReducing the scale of your report\n---------------------------------\n\nThe first thing to look for when trying to make a report smaller is the list of dimensions you're\nusing; each dimension you add has a multiplicative effect on the number of returned rows. Make sure\nyou only add the dimensions you need!\n\nSplitting your reports\n----------------------\n\nSometimes, you only need extremely accurate data for a portion of the report, with the rest\nallowing for less detail. For example, you could need extremely accurate details for the previous\nmonth's earnings, with stats per country and channel across every day, but only really need the\ncountry-level data when looking before that. You could therefore run a complex report for the\nprevious month, but a simpler one for the time before that.\n\nAvoid JSON parsing by switching to CSV\n--------------------------------------\n\nThe AdSense Management API allows you to receive your reports in CSV format, rather than the usual JSON.\n\nTo do that, simply call the alternate [generateCsv](/adsense/management/reference/rest/v2/accounts.reports/generateCsv) method.\n\n#### Example\n\n```\nDATE,CLICKS\n2014-01-01,2\n2014-01-02,1\n2014-01-03,4\n2014-01-04,1\n2014-01-05,1\n```\n\nNext steps\n----------\n\n- [Batching](/adsense/management/reporting/batching)\n- [Using Multiple Dimensions Wisely](/adsense/management/reporting/dimensions_metrics#usingmultiple)"]]