Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daisukenishino2/c2da7b9fadf79c2ba7bcbfe01a73aea4 to your computer and use it in GitHub Desktop.
Save daisukenishino2/c2da7b9fadf79c2ba7bcbfe01a73aea4 to your computer and use it in GitHub Desktop.
Open棟梁:動的パラメタライズド・クエリの性能測定に使用した、各種リソース情報と、その測定結果。
<?xml version="1.0"?>
<ROOT>
SELECT * FROM SHIPPERS
<WHERE>
WHERE
<IF>SHIPPERID = @p1</IF>
<IF>hoge1 = @hoge1</IF>
・・・
<IF>hoge1 = @hogeN</IF> → ここの「N」を、10, 20, 50, 100, 200, 500, 1000 タグと増やしていって性能を測定。
</WHERE>
<PARAM>
p1, Int32, 1
</PARAM>
</ROOT>
@daisukenishino2
Copy link
Author

daisukenishino2 commented Aug 3, 2018

結果の分析

XML編集を再帰的に行っているため、200-300タグを超えてくると、リニアに性能劣化するので注意する。

image

なお、バッチの性能測定で使用した、NorthwindデーターベースのOrderテーブルから自動生成した動的SQLは、約30タグ。

@daisukenishino2
Copy link
Author

daisukenishino2 commented May 17, 2019

自動生成Daoによる解決策

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment