0 votes
151 views
Hello. I have submitted asynchronously the following query:

select coadd_object_id, ra, dec, mag_auto_g, mag_auto_r,
mag_auto_i, mag_auto_z from des_dr2.main where mag_auto_i < 20.5 and mag_auto_i > 20 and
flags_i < 4 and extended_class_coadd > 2.5

This should return a 7M object catalog (around 400 MB in fits format).

However, after one full day it never finishes, and is still executing. The job id is:

f3y5o5gzpljo2n3r

Is this expected? Thanks!
by nsevilla (320 points) | 151 views

1 Answer

+1 vote
Best answer

Async queries will timeout in the database after 24 hours, this appears to be what happened to that job since there is no record in the TAP or Data Lab logs about its completion. 

Note that your query uses constraints on two columns ('flags_i' and 'extended_class_coadd') which are not indexed.  By re-writing the query I was able to get a result in ~15 seconds, e.g.

select count(*) from  
    (select * from des_dr2.main  
     where mag_auto_i < 20.5 and mag_auto_i > 20) ss  
  where flags_i < 4 and extended_class_coadd > 2.5;


Note also that the use of sub-selects in queries like this is not supported for ASync queries so remember to submit as a normal Sync query.  Hope this helps.

by datalab (21.6k points)
selected by 2144

449 questions

463 answers

473 comments

658 users

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

Categories