Works from the execution plan, not from the query text. The plan is the only thing that knows what the database will actually do — and it is where you find out that a rewrite which looks equivalent has quietly stopped using an index.
When to use it
When a query is slow enoug