Categories
PostgreSQL

PGSQL Phriday #017

Invitation from James Blackwell-Sewell

I had the unexpected pleasure of meeting James when we worked together at Timescale. He’s a delightful chap, a great teacher and mentor in all things Postgres, and continues to help push things forward in the world of time-series data on the most advanced open-source, relational database in the world! šŸ˜

The challenge is below, but I have one bonus I’d like to invite folks to add as they publish. Who can create the coolest elephant image with AI to match their post? šŸ˜€

The Challenge

This week I’ve been given the honor of hosting PGSQL Phriday, and I’d like to hear some opinions on the largest elephant in the room (and itā€™s not Slonik this time!): Artificial Intelligence.

We are in the middle of an AI Summer, with bigger and bigger advances every month. Almost every company, every product, and seemingly every developer, has their own opinion on whatā€™s happening and why itā€™s important in their own corner of the tech world. But how does all this relate to our beloved PostgreSQL? Iā€™d love to see blog posts from anyone and everyone that has thoughts on the two key questions below.

I know a lot of products, extensions, and startups already exist in this space, I’d love to hear what you’re all up to! As always, counterpoints are welcome, if you’ve got concerns about AI and PostgreSQL, let us know.

Categories
PostgreSQL

PGSQL Phriday #016

Invitation from Ryan Booz

Many of the PostgreSQL newbies that I’ve engaged with lately are coming from other databases often because of company priorities to start adopting Postgres and migrating projects. Inevitably, one of the first things they want to learn once data starts flowing is how to tune queries. They typically have a lot of experience doing this type of work previously, just not with Postgres.

With that as the backdrop, the invitation for March is presented below.

The Challenge

For this monthā€™s PGSQL Phriday, Iā€™m asking you to discuss your process for tuning difficult queries. Specifically, try to focus on that one problematic query that really challenged you and you always use it as an example when helping or teaching others your methods.

For this post, try to think beyond the standard answers, otherwise weā€™ll have a lot of similar posts that reference EXPLAIN plans, stats views, and a few online plan viewing/analysis tools. You can absolutely talk about those things (they are essential after all) but try to focus on something about your process when a query is about to bring the server down.

  • How did you identify that this was the problematic query?
  • Where do you start when trying to dig in to get things running again?
  • Could you solve this particular problem with configuration changes rather than query changes?
  • How do you get a representative EXPLAIN plan and with what options?
  • How did you test your modified plan or server configuration?
  • If you donā€™t have access to Production, how could you verify things?
  • Do you use a product like Postgres.ai or Neon to branch the database for quick and easy iterations without impacting production?
  • { insert whatever question you think is valuable to answer! }

Iā€™d be delighted to have a group of posts to point new users to around the topic of query tuning. While there are many presentations and resources on the pieces that help get the job done, making it personal and talking about your specific environment, challenges, and ā€œah ha!ā€ moments to solve the query tuning case! And who knows, your post might be the foundation of a great conference talk in the future. (hint, hintā€¦ šŸ˜‰)

Remember the (simple) rules

  1. Write your article and post it Friday, March 8 any time. Weā€™re pretty lenient here, so if you post it early or sometime over the following weekend, thatā€™s OK.
  2. Use ā€œPGSQL Phriday #016ā€ or ā€œ#PGSQLPhriday 016ā€ in the title or first paragraph of your post.
  3. Link back to this invitation post at softwareandbooz.com. If you donā€™t, I may not include it in the final summary post.
  4. Announce your post somewhere on social media or the #pgsqlphriday channel on the PostgreSQL Slack. Use the hashtag #pgsqlphriday to get noticed and included.
Categories
PostgreSQL

PGSQL Phriday #015

Invitation from LƦtitia Avrot

LƦtitia is hosting for the second time, and the topic is sure to get a great discussion going – just like the first time she hosted and the conversation really Triggered some healthy debate. šŸ™‚

LƦtitia’s invitation and challenge

Itā€™s sometimes difficult to find a great topic and I like the kind of topics where there is no consensus. This one is a little particular: in my humble opinion, the database community has a consensus, itā€™s that developers donā€™t agree.

Letā€™s organize a debate between database people and developers! I hope this will lead to great conversation and better understanding between those two groups!

The challenge

Without further ado, here is the topic of the month: UUDI! In particular, Iā€™d like to hear about (feel free to embrace the subject and not follow this guide):

  • Your use case (why do you absolutely need them)
  • The problems you encountered (including performance issues and how you solved them)
  • what kind of UUID do you use?
  • what are your internal rules about them (all UUIDs, mix between regular IDs and UUIDs, no IDs) and how and why you came up with
  • UUIDs with sharding
  • sorting UUIDs
  • extension you might use
  • any other thing related to UUIDs