primer: split query and commit toc