Start query handeling.