add query detail thread