Denver SQL Saturday and How to Never be on Call as a DBA

It’s been a while since I’ve posted on the blog.  I wanted to share this post so that for anyone attending my session you will have a summary of the presentation ready for you to review.  I’ll be presenting 2 sessions at Denver SQL Saturday on August 17th 2024.   

I will be presenting 

“How to: Never be on call as a DBA!”  at 2:00 pm

And 

Postgres for the SQL Server DBA at 3:15 pm

For my session “How to: Never be on call as a DBA” , I’ve included a follow-up document that you can obtain at the link below. 

https://bit.ly/Neverbeoncall_WrightDB

It’s a simple PDF with an outline of things we discussed and ways you can do this better in the future.   I hope to have this session recorded in the future as well and then I’ll add a link to that presentation as well.  

I hope to see you in Denver!  Please stop by and say hello at the event!  

I’m off to the Summit!

It’s been a while since I’ve written, funny that I’m about to write about something else that I haven’t done in a long time.   I will be attending the PASS Data Community Summit next week (Nov 14-17th).  

I will be delivering a presentation on Thursday(11-16) at 4:45-6:00 pm in Room 401.   This will be the first time I’ve ever presented at the PASS Summit.  Even though I used to attend this event every year I actually never wore a speaker badge.   It was one of those things I always wanted to earn in my career.  Somewhat funny how you leave something for many years and when you come back you can get the one thing you wanted.  

For a quick little history. From about 2004 until 2016 I attended, volunteered, helped organize, and documented in very many pictures the Community we commonly call #SQLFamily.  This was truly some of the best times in my life with these wonderful individuals that I really see as family. I’m very eager to be part of that community once again and catch up with old friends.  

I’m also very excited that I’ll get some much-needed Photowalk time in Washington, this was a tradition we started to get out and see the area around us and take pictures. I’m planning a hike and waterfall expedition on Sunday that will not be anywhere near the city!  

I’ve really looked forward to this event for the whole year!  I have one little minor event to take care of on Friday (Big Mountain Data and Dev Conference, you can still get tickets!), then I’ll be packing my bags and heading out!   

Can’t wait to see the #sqlFamily again!   In case you want to take a little stroll down memory lane for any of my PASS friends.  Enjoy.  

Pass Photos

PGSQL Phriday #005 Relational VS Non Relational data. 

I always kinda see a fight in my mind when someone mentions Relational/Non-Relational. I took this picture long ago and some good friends are posing for me. 

This post is in relation to the #PGSQLPhriday blogging series. The original post for this discussion is located here. Thank you Ryan Lambert for such a great topic and for hosting this month! 

Ryan posted a challenge on how are you using Postgres. I felt like for this post instead of focusing on one question. I would simply answer all of them! I really liked all the questions so I’m just going to answer them! 

What non-relational data do you store in Postgres and how do you use it?

In the current company/PG servers, I work with and deal with. We have a great number of JsonB columns that house Non-relational data. I am newer to this company so really didn’t have much of a say in the design of this particular aspect. Currently, it’s primarily used as a logging/settings store in those JSONB columns. It was a pattern that was created with good intent but misused. Turning into the Data Junk Drawer. Unfortunately, the data is needed in many cases and so you have procedures/functions out there trying to query the data out of these fields and use it in various cases. This is not an ideal use for it. 

One good example of non-relational data used well. I did some contract work for a document scanning company that would use OCR to read most of the data/metadata about the documents and put them into table structures and then store a link to the actual document in a file store. This link was added to the row so the application could retrieve the document but it wouldn’t be actually stored in the DB. The performance issues they called me for were still related to the data they were trying to scan but it was mostly bad indexing. Once we corrected the indexes everything worked much better and they had a good system that would scale reasonably well. 

Have you attempted non-relational uses of Postgres that did not work well? What was the problem?

Yes, Besides the current system, I mentioned above for the “Junk Drawer”. I also ran into another company that did store logos/graphics/images for the website in the DB. The retrieval from the DB wasn’t really horrible since they were pulling exactly a row/column from the DB, the real issue came along with caching. Websites can’t take 2 minutes to pull up images and documents and they depend on the cache to make them run fast. The web servers of the time couldn’t cache the documents since they were DB calls and not static documents. This means that each website load had to re-pull the data. Once this system started scaling and getting lots of requests the web servers couldn’t keep up re-loading the images over and over. In the end, they had to move this out of the DB and into the Webserver cache where it belongs. I strongly urge all of my customers to never store images/graphics in the DB at all if they can avoid it. 

What are the biggest challenges with your data, whatever its structure?

Right now the biggest challenge for the current project/company I work for is just related to DB sprawl. We have 10+ years of the DB being designed with a monolithic application that added new tables all into the same DB. Only a few of the functions/design of the application was broken apart into separate pieces, separate schemas, or really separated at all. This is not uncommon in the industry since many companies that have been building software for 10-15 years started out with monolithic applications and rarely do we go back and focus on the technical debt side of things. Moving systems like this to a Service Oriented Architecture or even just breaking it up into different pieces takes time and a lot of cultural change for a company. It’s always a long-term project and usually, in a larger company it will take years to complete. It’s a fun challenge to have and you can find small wins by breaking off smaller pieces and starting on new products/new features in a new system. 

How do you define non-relational data?

I like to define data based on how it’s used. I tend to see a lot of various data with companies so I tend to keep an open mind and just base my definitions on how the data is used. An example of this is Search, We all know PG and many RDBMSs can have indexes and search very quickly through millions of rows of data. I’ve found in past experiences that moving heavy search functions off to something like Elasticsearch has been a great way to speed up search even more. RDBMSs are really not great at doing textual style searches vs something like an Elasticsearch engine. It’s an excellent example of using the right tool for how the data is being used. 

I really enjoyed this #PGSQLPhriday, I hope more in the community will join in the fun and join us in a future #PGSQLPhriday. Thank you Ryan Lambert for the great topic!