Group by limit per group in PostgreSQL

In web applications it’s very common to try to limit the results by group. For example showing all the new posts with the the two latest comments on them. Or have the best selling categories in an e-commerce website showing the 3 most popular products in those categories.

In MySQL … Continue reading

Split or leave frequently updated column in PostgreSQL

Make you postgresql run

I have a database migrated from MySQL to PostgreSQL (I had my good reasons but this post is not about that). In MySQL because of MVCC behaviour it makes sense and it’s actually a recommendation to split frequently updated columns from large tables especially if using a web framework like Django … Continue reading

Postgresql full text search vs Solr

Postgresql has really come a long way from being the standard but relatively slow database to the feature rich and extremely fast database what it is today. Supporting unstructured data (HSTORE, JSON[B]), geo function (PostGIS), full text search  (TSVECTOR) it is representing a true competition to the search engines.

Looking … Continue reading