Database query optimization (avoid FTS) (AISAB-170)