(Josh Williams) All they really wanted to do is log any query that takes over 10 seconds. Most of their queries are very simple and fast, but the application generates a few complicated queries for some actions.
Tag: Open Source
Raster Words using PostGIS 2.1
(Leo Hsu and Regina Obe) Two of the big changes in PostGIS 2.1 raster are the improved speed and functionality of the raster ST_Union function and ST_Clip. Aside from speed, the big thing with ST_Union in 2.1 is that it applies operations to all bands by default.
Catalog SQL Friday: using DO when we’ve got tables as variables
(selena deckelmann) Just a quick note about modifying constraints:
MySQL 5.6 security vs ease of use
(Peter Zaitsev) MySQL 5.6 surely changes the game when it comes to security vs ease of use. Before MySQL 5.6 we would get default MySQL installation being pretty insecure – the user “root” will be created with no password as well as anonymous user with limited access from local host (though still en
Materialized geometry_columns using Event Triggers
(Leo Hsu and Regina Obe) One of the big changes in PostGIS 2.0 was that the geometry_columns table became a read only view. This change was not without sacrifice. On the plus it meant a table no longer needed to be maintained which was a relief for those who had to constantly ensure the sideline tab
Calculating timezone offsets
(Giuseppe Maxia) Time zones are a tricky feature. You live in a given time zone, and most of the time you won’t think about that at all. You may live in a place where you are conscious of time zones, such as the United States, if your business spans across the country, where you know that New York i
Use UUIDs as Keys
(Joe Van Dyk) If data integrity is critical for your systems, you should be using UUIDs for keys. True, they take up a bit more space in storage and memory and aren’t quite as fast. But since UUIDs are by definition unique, your data is more likely to be consistent.
Caching data with materialized views and statement level triggers
(Leo Hsu and Regina Obe) One exciting new feature coming in PostgreSQL 9.3 is materialized views. Materialized views is really a mechanism for caching data of a query. It is especially useful if you have long running queries where the answers change infreqently. There are many things unfortunately t
Understanding max_connect_errors
(Todd Farmer) To only slightly misquote one of the greatest movies of all times:
Fancy SQL Monday: generate_series() and cross joins
(Josh Berkus) So, here’s the situation: you want to create a report which shows totals of registrations by day and by category, and shows zeros for each day and category you don’t have any registrations for. Your first attempt looks like this:
