remove unnecessary conditions
remove duplicate tag-combinations beforehand using SQL