Athena - query with select <field> is running "endless"

The below query is running “endless” in Athena, which I stop the execution after running for 15 min.
SELECT <15 fields>
FROM table1 t1
INNER JOIN table2 t2 ON t1.f1 = t2.f1
INNER JOIN table3 t3 ON t3.f1 = t1.f3
WHERE t1.f4 IS NOT NULL AND t1.f5 IS NULL AND t1.f6 IS NULL
AND t1.f7 IS NOT NULL
Same issue when change to select 1 field.

If I replace the <15 fields> with count(*), it took only 30 sec to give the results.

Hi @lbl

Based on your description, the issue appears to be in the database and not QuickSight

Since this is a relational database you should be able to review the execution plan in the database. The query may not be using the required indexes and hence may be running slow. The fix if any should be on the database side.

Regards,
Giri

Hi @lbl,
It’s been awhile since we last heard from you, did you have any additional questions regarding your initial post or were you able to find a work around?

If we do not hear back within the next 3 business days, I’ll close out this topic.

Thank you!