Make sure there is no faulty or weirdly formatted data in your production database table.
You should do a "SELECT * FROM tablename" on the test database table and compare it to the production database table.
We screwed up an import once, and one row prevented the query from displaying anything. I think the conclusion was that we accidentally imported an .xlsx file (which there is no support for), and we got the same result as your error messages when trying to display the query.