Thanks for your message. We've added indexes to the 'mjd' and 'exposure' columns of the nsc_dr2.meas table and they have finished building. I didn't see much in your query that could be optimized for the data that you want, however I *would* suggest you join on the 'mjd' value rather than 'exposure' because it should be significantly faster using floating-point indexes rather than text. Because a full result set will be 1.7B rows you'll still need to process in chunks using the random-id as you've been doing, but each query should now only in 1-2 sec (in the DB).
Hope this helps, let us know if you continue to have problems or questions.