sql - Changing to join instead of sub query -


    select          a.id, min(s.datetime),          max(s.datetime),          min(s.id)    asdt    inner join alm al on id = al.id,    sta s             a.id not in (select id alm distance <= a.radius )         group a.id 

this query runs slow due subquery when checking distance against a.radius upper table.


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -