Query does not finish in UI and executes in just few ms in Database

Hello Redash,

I have noticed that there were few topics on this issue, hopefully this one points you in the right direction to help with assistance.

  1. AWS instance (t2.medium) non-docker installation w/ swap
  2. Postgres Database
  3. Full query executes on Database in few ms, however hangs in Redash UI
  4. With LIMIT 4, query runs fine in UI, but with LIMIT 5 runs does not finish
  5. i have increased concurrent workers from 2 to 10, but that did not help
  6. there are no errors in celery logs, supervisor logs and nginx logs.

What parameters could be changed or looked at?

Thank you

Update. The issue might be with Javascript parsing the result of the query.

this is the error that I am getting

seems like the value in question is this “annualized_return”: NaN, somehow data becomes NaN instead of null.

Conclusion.

The query returns value of NaN and Javascript code fails to parse it. The workaround is to substitute NaN with null.

select NULLIF(annualized_return, ‘NaN’) annualized_return from table.