The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Archive for July 8th, 2025

HackErOpUit – agenda with hacker/maker/security related conferences and meetings in or near The Netherlands; add your own event through a pull request

Posted by jpluimers on 2025/07/08

[Wayback/Archive] HackErOpUit

Pull-requests via [Wayback/Archive] GitHub – revspace/hackeropuit: HackErOpUit.nl website

An overview of hacker-events in and around the Netherlands

Patches welcome ;) (Both in the code as with new events)

The different kinds of events are at [Wayback/Archive] hackeropuit/events at master · revspace/hackeropuit · GitHub.

Via: [Wayback/Archive] Angry Nerds – de privacy en security podcast. ->  [Wayback/ArchiveDiscord | #houd-toch-je-feedback | Angrynerds Podcast

--jeroen

Posted in Development, Hardware, Power User, Security, Software Development | Tagged: | Leave a Comment »

SQL: WHERE versus HAVING

Posted by jpluimers on 2025/07/08

While writing Some SQLite things I recently learned a while ago I bumped into SQLite extending the SQL syntax allowing SELECT column aliases in WHERE and ON conditions of JOIN clauses whereas standard SQL only allows it in the HAVING clause (some other DMBS allow this as well).

It reminded I never wrote a blog post about WHERE versus HAVING, which can be phrased into just two points:

  • WHERE is applied before the SELECT is assembled
  • HAVING is applied after the SELECT is assembled

This also means WHERE has a lot more influence on performance than HAVING, so using HAVING just so you can use aliases there instead of in the WHERE clauses is not a smart idea unless you verify in the query plan and query optimisation output of our DBMS this has no influence (some DBMS even allow you to see the results of query rewriting which you can use to verify if two queries really are equivalent from the DBMS perspective).

Since HAVING can be used without GROUP BY, many people work around the WHERE alias limitation. Given the above effects on performance, this is not a wise idea, despite the same end-results. See the example below that uses the [Wayback/Archive] MySQL :: Sakila Sample Database: customer table.

Luckily there has been enough other material explaining WHERE versus HAVING, so I can reference it from here, for instance (note note limited to MySQL/MariaDB) [Wayback/Archive] mysql – WHERE vs HAVING – Stack Overflow (thanks [Wayback/Archive] baloo and [Wayback/Archive] Fishdrowned):

Read the rest of this entry »

Posted in Conference Topics, Conferences, Database Development, Development, Event, MariaDB, MySQL, SQL, SQLite | Tagged: , | Leave a Comment »