# large files with mk-query-digest

**URL:** <https://forums.percona.com/t/large-files-with-mk-query-digest/1523>\
**Category:** Other MySQL® Questions\
**Created:** [September 30, 2010, 3:26pm UTC](https://forums.percona.com/t/large-files-with-mk-query-digest/1523 "2010-09-30T15:26:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![iberkner](https://avatars.discourse-cdn.com/v4/letter/i/c67d28/32.png) [@iberkner](https://forums.percona.com/u/iberkner)\
**Post date:** [September 30, 2010, 3:26pm UTC](https://forums.percona.com/t/large-files-with-mk-query-digest/1523/1 "2010-09-30T15:26:17Z")

</div>

I have 2 slow query log files. One is 6GB, the other is 20GB. I’d like to run them through mk-query-digest, any suggestions? I’ve got one running already for 1+ hours.

Thanks

---

<div class="post-metadata">

**Author:** ![justin.swanhart](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/justin.swanhart/32/16904_2.png) [@justin.swanhart](https://forums.percona.com/u/justin.swanhart)\
**Post date:** [September 30, 2010, 4:07pm UTC](https://forums.percona.com/t/large-files-with-mk-query-digest/1523/2 "2010-09-30T16:07:28Z")

</div>

You can split up the source files using the ‘split’ command, run mk-query-digest on the split files to produce one report per file, then use [URL][http://www.maatkit.org/doc/mk-merge-mqd-results.html[/URL]](http://www.maatkit.org/doc/mk-merge-mqd-results.html%5B/URL%5D) to merge the reports together.

---

<div class="post-metadata">

**Author:** ![iberkner](https://avatars.discourse-cdn.com/v4/letter/i/c67d28/32.png) [@iberkner](https://forums.percona.com/u/iberkner)\
**Post date:** [October 1, 2010, 2:20pm UTC](https://forums.percona.com/t/large-files-with-mk-query-digest/1523/3 "2010-10-01T14:20:49Z")

</div>

Thanks, the split command worked well.

I now have 76 250MB files.

I processed each of them through mk-query-digest using the --save-result option which generated 76 .gz files.

I then ran mk-merge-mqd-results res1.gz … res76.gz, but it fails with this error:

Error merging class/sample: undefined min value at ./mk-merge-mqd-results line 2788

I guess there are problems with some of the files, as ultimately the composite log is still generated.

---

<div class="post-metadata">

**Author:** ![xaprb](https://avatars.discourse-cdn.com/v4/letter/x/49beb7/32.png) [@xaprb](https://forums.percona.com/u/xaprb)\
**Post date:** [October 7, 2010, 8:37am UTC](https://forums.percona.com/t/large-files-with-mk-query-digest/1523/4 "2010-10-07T08:37:15Z")

</div>

That seems to be a bug. Can you generate a reproducible test case and submit it to Maatkit’s bug tracker at [URL][Google Code Archive - Long-term storage for Google Code Project Hosting.](http://code.google.com/p/maatkit/issues/list%5B/URL%5D) ?
