If the business couldn't hire a dev that knows that you don't write a query without ensuring it uses some index when it runs then the business deserved to die and I wouldn't place any blame on the dev who in business terms is just a resource. Bad resource, but just a resource, so they can't be blamed for the failure of the business.
And the root cause is hiring process that admits devs that can do db api call but have no idea what having database as a component of your app actually entails.