Skip to main content
13 events
when toggle format what by license comment
Dec 31, 2020 at 16:53 vote accept Andrei Berenda
Dec 31, 2020 at 3:03 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Jul 11, 2018 at 13:09 answer added Daniel Vérité timeline score: 1
Jul 11, 2018 at 11:56 history tweeted twitter.com/StackDBAs/status/1017014764038508544
Jul 11, 2018 at 0:11 history edited Andrei Berenda CC BY-SA 4.0
add from
Jul 10, 2018 at 22:02 comment added sticky bit The join in the third query makes not much sense to me. It might reduce the set to the NOT IN a little if there are users, that are in calls but not in users but those won't be selected from users in the outer query either, as they don't exist. And I guess you might be best of with a NOT EXISTS after all.
Jul 10, 2018 at 22:02 comment added sticky bit Not only your "negation" of >= is wrong, that'll be < not <=, the first query will also include users, that are not in calls at all (or with a creation time of null), whereas the second will only select users (I just guess that's the target for all three as the second and third also miss a FROM (the third even twice)), that are in calls with a not null creation time matching the inequality.
Jul 10, 2018 at 19:49 comment added user1822 If you want to know which one is most efficient, check the execution plan
Jul 10, 2018 at 19:48 history edited user1822
edited tags
Jul 10, 2018 at 19:37 comment added Joe W Those queries will return different results as you are using a >= for two of them and a <= for the third. That will mean users created on that date in the where clause will not br in two of the result sets but will be in the third.
Jul 10, 2018 at 19:18 review First posts
Jul 10, 2018 at 19:42
Jul 10, 2018 at 19:17 comment added mustaccio Better according to what criteria?
Jul 10, 2018 at 19:16 history asked Andrei Berenda CC BY-SA 4.0