_binary diff --git a/bin/debug_mix_itr.php b/bin/debug_mix_itr.php
new file mode 100644
index 0000000..3fb0455
--- /dev/null
+++ b/bin/debug_mix_itr.php
@@ -0,0 +1,132 @@
+<?php
+
+if(php_sapi_name() != 'cli') {echo "BAD REQUEST"; exit();}
+
+/**
+ * Calculate base directory of script
+ * @ignore
+ */
+define("BASE_DIR", substr(
+    dirname(realpath($_SERVER['PHP_SELF'])), 0,
+    -strlen("/bin")));
+
+require_once BASE_DIR.'/configs/config.php';
+require_once BASE_DIR."/lib/locale_functions.php";
+require_once BASE_DIR."/controllers/search_controller.php";
+require_once BASE_DIR."/models/crawl_model.php";
+require_once BASE_DIR."/lib/archive_bundle_iterators/mix_archive_bundle_iterator.php";
+
+define('CRAWLTIME', '1365127488');
+define('CRAWLMIX', 'DEBUG');
+
+function main()
+{
+    setLocaleObject('en-US');
+    $crawl_model = new CrawlModel();
+    $num_pages = 1;
+    $num_calls = 1;
+    $query = '';
+
+    global $argv;
+    $num_args = count($argv);
+    if ($num_args >= 2) {
+        $arg = $argv[1];
+        if ($arg == 'delete') {
+            deleteCrawlMix($crawl_model);
+            printf("deleted iterator\n");
+            exit();
+        } else if ($arg == 'new') {
+            if ($num_args >= 3) {
+                $query = $argv[2];
+            }
+            buildCrawlMix($crawl_model, $query);
+            printf("new iterator, query = '%s'\n", $query);
+            exit();
+        } else {
+            $num_pages = $arg;
+            if (preg_match('/([1-9]\d*)x([1-9]\d*)/', $arg, $groups)) {
+                $num_pages = intval($groups[1]);
+                $num_calls = intval($groups[2]);
+            } else {
+                $num_pages = intval($arg);
+            }
+            if ($num_pages < 1) {
+                printf("unrecognized option: '%s'\n", $arg);
+                exit(1);
+            }
+        }
+    }
+
+    $mix_iterator = retrieveCrawlMix($crawl_model);
+    for ($i = 0; $i < $num_calls; $i++) {
+        $pages = $mix_iterator->nextPages($num_pages);
+        printPages($pages);
+    }
+}
+
+function printPages($pages)
+{
+    if (isset($pages['NO_PROCESS'])) {
+        unset($pages['NO_PROCESS']);
+    }
+    $count = count($pages);
+    $a = 'NONE';
+    $b = 'NONE';
+    if ($count > 0) {
+        $a = trim($pages[0]['s']);
+    }
+    if ($count > 1) {
+        $b = trim($pages[$count - 1]['s']);
+    }
+    printf("fetched %d pages (%s .. %s)\n", $count, $a, $b);
+}
+
+function deleteCrawlMix($crawl_model)
+{
+    $mix_time = $crawl_model->getCrawlMixTimestamp(CRAWLMIX);
+    if ($mix_time) {
+        $searchController = new SearchController();
+        $searchController->clearQuerySavepoint($mix_time);
+        $archive_dir = WORK_DIRECTORY."/schedules/NameArchiveIterator".
+            $mix_time;
+        if (file_exists($archive_dir)) {
+            $db_class = ucfirst(DBMS)."Manager";
+            $db = new $db_class();
+            $db->unlinkRecursive($archive_dir);
+        }
+        $crawl_model->deleteCrawlMix($mix_time);
+    }
+}
+
+function buildCrawlMix($crawl_model, $query)
+{
+    $mix_time = time();
+
+    // Replace any existing crawl mix.
+    $old_time = $crawl_model->getCrawlMixTimestamp(CRAWLMIX);
+    if ($old_time) {
+        deleteCrawlMix($crawl_model);
+    }
+
+    $crawl_model->setCrawlMix(array(
+        'MIX_TIMESTAMP' => $mix_time,
+        'MIX_NAME' => CRAWLMIX,
+        'GROUPS' => array(
+            array(
+                'RESULT_BOUND' => 1,
+                'COMPONENTS' => array(
+                    array(
+                        'CRAWL_TIMESTAMP' => CRAWLTIME,
+                        'WEIGHT' => 1.0,
+                        'KEYWORDS' => $query))))));
+
+    return new MixArchiveBundleIterator($mix_time, $mix_time);
+}
+
+function retrieveCrawlMix($crawl_model)
+{
+    $mix_time = $crawl_model->getCrawlMixTimestamp(CRAWLMIX);
+    return new MixArchiveBundleIterator($mix_time, $mix_time);
+}
+
+main();
diff --git a/test_mix_itr.sh b/test_mix_itr.sh
new file mode 100755
index 0000000..836d246
--- /dev/null
+++ b/test_mix_itr.sh
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+
+ROUNDS=${1-3}
+SIZE=${2-5}
+QUERY=${3-}
+
+function do_rounds {
+    echo "--"
+    for i in $(seq 1 $ROUNDS); do
+        php bin/debug_mix_itr.php $SIZE
+        if (( $ROUNDS - $i > 0 )); then
+            echo "--"
+        fi
+    done
+}
+
+php bin/debug_mix_itr.php delete && \
+php bin/debug_mix_itr.php new "$QUERY" && \
+do_rounds
