a wild-goose chase
Meaning
A search or pursuit that is unlikely to find what someone wants.
Tone & use
Informal and often mildly critical. Use it when the search itself is pointless, not just when it takes a long time.
Example
“We went on a wild-goose chase looking for the old entrance; the building had been renumbered years ago.”