Query works only in preview mode but loops forever when "Run"

Hi, I have a sql query that works only in preview mode, when click "Run", it loops forever. Would you please give me any instruction? Thanks.

Hi @tech_test Thanks for reaching out! Can you share a screenshot of the query? I think there could be a few reasons for this behavior :thinking:

Here are some troubleshooting ideas:

1). Do you have a success handler on the query? For example, are you calling the same query again on success? Are you calling another query that causes this query to re-evaluate? Success handlers won't trigger when you click Preview, but they will trigger when you click Run

2). Do you have any dynamic inputs (anything in {{}})? If so, is it possible that these inputs are getting refreshed, causing the query to re-trigger?

3). Are there any errors or warnings in the debug console (bottom right corner)?

Hi Tess,
I solved this problem by delete and rewrite it again, thought I have no idea why.
Thanks again for your help.
Bo

Very strange! But glad to hear it's resolved! Definitely let us know if you run into the issue again

Hi Tess,
Please check my screenshot in attachment: a single query of 5k rows and 11 columns (select * from tablename) cost 101 seconds. Thanks and Best Regards, Bo

Screenshot 2023-09-29 210935.png

Hi @tech_test has the performance changed over time? If you hover over 101.8s, you'll see a tooltip that breaks down which parts of the query are taking the longest. Our docs give more context on each part of the query time