0 votes
13 views
I've saved a table of lightcurves to mydb and I'm trying to INNER JOIN some small, temporary tables to get subsets of that table. In doing so, I found my queries were running seemingly forever. I've been able to reproduce the issue with a minimal working example, but I don't understand it. mydb://temp is one of the small temporary tables, and mydb://stable_lcs is the big table holding all the lightcurves I'm interested in.

This query: SELECT objectid FROM mydb://temp LIMIT 2 returns results 182752_32789, 185281_28807 in less than a second.

This query: SELECT * FROM mydb://stable_lcs WHERE objectid IN ('182752_32789', '185281_28807')" returns their lightcurves, as expected, also in less than a second.

If I nest these: SELECT * FROM mydb://stable_lcs WHERE objectid IN (SELECT objectid FROM mydb://temp LIMIT 2) this query runs seemingly forever. Moreover, if I stop the execution and rerun the first query, now that query takes forever too. Eventually, like 5-10 minutes or so, I can query mydb://temp again. Why?
ago by adriansh (170 points)
edited ago by 0 | 13 views

1 Answer

0 votes
Hi, thanks for reaching out. Would you mind telling us your account name? (you were not logged in when you asked your question, hence we see it as submitted by "anonymous"). If we know your account we might be able to access your temp and stable_lcs tables to see what's going on.

Thanks!
ago by robertdemo (8.9k points)
Ah, sorry. It's adriansh

444 questions

460 answers

464 comments

657 users

Welcome to Data Lab Help Desk, where you can ask questions and receive answers from other members of the community.

Categories