I managed to reduce a PostgreSQL view’s query time by more than 80% with just the two keywords NOT MATERIALIZED and by reading the actual database manual when GPT-4 gave up. Below, I will explain the context of the speedup. I recently moved a little bit of business logic from an API endpoint and into… Continue reading NOT MATERIALIZED
Category: Software
Web-friendly images with ImageMagick
Before uploading images to my blog or AI Tales, I run them through ImageMagick to resize and convert them to “web-friendly” JPGs: The command converts all PNG images in a folder to JPG while preserving the filename. Even though quality is set to 50% (you can of course experience with this, I often don’t see… Continue reading Web-friendly images with ImageMagick
Simple website visitor stats and location with GoAccess
I do not use cookies or browser trackers (like Google Analytics) on any of my personal websites to track visitor information. From time to time however, it is nice to get an idea of the amount traffic to my sites, including what pages get viewed the most. I use the following one-liner for this: Read… Continue reading Simple website visitor stats and location with GoAccess
AI Tales
I recently launched a new website called AI Tales, where I share small snippets of text, generated by AI, edited by me. AI Tales is going to be my playground for sharing pieces of text that I find “interesting” in one way or another. I will try to update it regularly with new content. We… Continue reading AI Tales
Clean up harddrive space on Ubuntu Server with journalctl
After running for a while, an Ubuntu server tend to get bloated with… stuff. One particularly weird one is the disk usage of a bunch of /var/log/journal/* entries that hog a lot of space. In my case, 2GB. This is significant on a machine with just 20GB of space. You can see their disk usage… Continue reading Clean up harddrive space on Ubuntu Server with journalctl