                :ordered ordered})
             (root-filter-plan db where order)))
 
+      ; when no indexes use root-filter-plan -> optimal
+      ; when some reasonable, most selective first index -> probably optimal
+      ; when non-index or not-most selective first -> suboptimal
       (= :and op)
         (let [main-plan     (where-plan db (first wrest) order)
               filter-wheres (next wrest)]

             :ordered false}
            (root-filter-plan db where order)))

      (= :in op)
        (let [[attr in] wrest]
          (if (index-on db attr)

           :ordered (:ordered main-plan)
           :source  main-plan})

      ; meh -> fair but not great
      (= :or op)
        (let [sub-plans (map #(where-plan db % order) wrest)]
          {:action  :union
