Chris walks through using the acts_as_tenant gem. He shows some example code to get started with this gem, how to migrate, and other tips for working with B2B or multi-tenant applications.
Automate Postgres with your review apps! Chris offers up some sample code for GitHub actions and getting a test Postgres database created, getting the connection string to your review app, and closing it down.
Thinking about using pgvector to power some AI data in your Rails app? Chris walks through the very handy Neighbor gem and how it helps for vector data types and ActiveRecord.
We are excited about some of the Active Record updates with Rails 7.1! Chris reviews some of the notable new features for working with Postgres including async queries, composite primary keys, native support for CTEs, unlogged tables, and syntax normalization.
Chris digs into some example code for the new JSON features that just launched with Postgres 16 last week. A new check for finding json objects and some new object and array functions.
pgvector for Postgres recently got a big upgrade with the new HNSW indexes. Chris explains what they are, how to use them, and what the accuracy and performance implications are for adding these.
pgvector for AI in Postgres catch your eye? Start thinking about scaling and performance now. Chris has some tips about partitioning and truncating data to strike that perfect balance between performance and accuracy.
Chris has some tips on helping you get the most out of queries when working with a remote Postgres foreign data wrapper. He has an overview of how queries are executed with the fdw and then samples for using CTEs, sub-queries, materialized views, and more.
Hyperloglog is a Postgres extension for doing high-compression storage and query approximations. Chris shows you how to get started building a metrics system inside your Postgres database while saving on storage space and query time.
AI has exploded the amount of vector data being generated. Getting performance can be uncertain, until you know the keys. Chris explains the 3 basics you need to get performance out of vector data with Postgres.
Chris has some tips for working with Ruby on Rails and ActiveRecord and using better SQL to improve performance and avoid N+1 queries.
Chris has some sample code for synching data from Postgres to MongoDB using Foreign Data Wrappers and Triggers.
To continue to provide developers with the best Postgres experience, Crunchy Bridge now offers easy connectivity between managed Postgres and MongoDB.
Chris is cooking up some examples for us on how to use AI inside Postgres. We have a simple demo of using pgvector and Open AI to grab relationships and query for other similar items.
JSON in Postgres is now 10 years old. Chris recently published a JSON tutorial and offers some thoughts on the past and future of JSON, and what developers need to be aware of.
When it comes to database performance, many think they are solving technical problems, but are solving a money problem. There are 2 phases to database-cost management, and understanding which phase you are in will help you understand your options for growth.
Which of my applications ran this SQL statement? Use SQL comments to track which application ran which queries.
For developers, databases are basically magic. Like Penn & Teller, this blog post is set to break the illusion. Databases are just like any other code, they have algorithms and processes. These algorithms and processes are meant to improve performance, but can cause limitations if they are not expected.