“Row Movement” in PostgreSQL… Is it bad?
Shane Borden's Technology Blog » PostgreSQL
by sborden76
7M ago
In Oracle, right or wrong, I was always taught to try to avoid “row movement” between partitions due to the general thought that the extra workload of a “delete” + “insert” (rewrite of the row) should be avoided due to the extra I/O, index fragmentation and the associated risks of a migrating ROWID in the cases where the app developers might have used it in their code (now that’s a whole other problem). Oracle didn’t even let you do it by default. Table by table, you had to explicitly set: alter table [table name] enable row movement; Now, you also had to set this to do table reorganization ..read more
Visit website
Using the “hint_plan” Table Provided by the PostgreSQL Extension “pg_hint_plan”
Shane Borden's Technology Blog » PostgreSQL
by sborden76
7M ago
Introduction For those who have worked with Oracle, the pg_hint_plan extension is one that will allow you to hint plans in patterns that you are likely very familiar with: sql_patch sql_profile sql_plan_baselines While currently, the functionality provided by pg_hint_plan is not nearly as robust (hints list), it does provide most of what you would encounter day to day as a DBA. That being said, one thing that is currently missing is the ability to easily add hints without changing code via stored_procedures / functions like in Oracle. The only way to currently do this in Open Source Postgr ..read more
Visit website
Leverage Google Cloud Logging + Monitoring for Custom Cloud SQL for Postgres or AlloyDB Alerts
Shane Borden's Technology Blog » PostgreSQL
by sborden76
7M ago
As migrations to CloudSQL and AlloyDB pick up speed, inevitably you will run into a condition where the cloud tooling has not quite caught up with exposing custom alerts and incidents that you may be exposing on-premises with tools such as Nagios or Oracle Enterprise Manager. One such example is monitoring of replication tools such as the GoldenGate Heartbeat table. While there are many ways that you may be able to implement this, I wanted to demonstrate a way to leverage Google Cloud Logging + Google Cloud Monitoring. Using this method will allow us to keep a long term log of certain para ..read more
Visit website
Why is My App Table Scanning in PostgreSQL but not Oracle?
Shane Borden's Technology Blog » PostgreSQL
by sborden76
7M ago
My team and I have been working on a lot of migrations off of Oracle and onto Google CloudSQL for Postgres / AlloyDB lately. One of the common things that I have been seeing in my performance tuning / migration activities is that Oracle handles certain application datatypes differently than PostgreSQL. For my most recent client, they used the “float” datatype extensively in their Java code and unfortunately, the PostgreSQL JDBC driver doesn’t convert that datatype like the Oracle JDBC driver does. The result of the datatype mismatch ends up as a full table scan in PostgreSQL whereas in Or ..read more
Visit website
Tuning the PostgreSQL “random_page_cost” Parameter
Shane Borden's Technology Blog » PostgreSQL
by sborden76
7M ago
In my previous post “Three Configuration Parameters for PostgreSQL That Are Worth Further Investigation!“, I introduced three PostgreSQL parameters that I feel are the most “neglected” and present the most opportunity for performance tuning in a PostgreSQL instance. I’ve previously posted parts 1 and 2 which cover “work_mem” and “effective_io_concurrency“, so in the final part of this series, I would like to demonstrate tuning the “random_page_cost” parameter. Because PostgreSQL has the ability to be installed on many different types of systems, the default for this parameter represents a ..read more
Visit website
Tuning the PostgreSQL “effective_io_concurrency” Parameter
Shane Borden's Technology Blog » PostgreSQL
by sborden76
7M ago
In my previous post “Three Configuration Parameters for PostgreSQL That Are Worth Further Investigation!“, I introduced three PostgreSQL parameters that I feel are the most “neglected” and present the most opportunity for performance tuning in a PostgreSQL instance. I’ve previously discussed “work_mem” in a previous post, so in Part 2 of this series, I would like to demonstrate tuning the “effective_io_concurrency” parameter. While this parameter has been discussed in other blogs, I will attempt to make this discussion relevant to how it might affect a CloudSQL instance. The parameter “eff ..read more
Visit website
Tuning the PostgreSQL “work_mem” Parameter
Shane Borden's Technology Blog » PostgreSQL
by sborden76
7M ago
In my previous post “Three Configuration Parameters for PostgreSQL That Are Worth Further Investigation!“, I introduced three PostgreSQL parameters that I feel are the most “neglected” and present the most opportunity for performance tuning in a PostgreSQL instance. In the first of what will become a three part series, I would like to demonstrate tuning the “work_mem” parameter. The “work_mem” parameter optimizes database operations such as: sorts bitmap heap scans hash joins materialized common table expressions (WITH statements) To get started, lets create a test table with 100M rows o ..read more
Visit website
Three Configuration Parameters for PostgreSQL That Are Worth Further Investigation!
Shane Borden's Technology Blog » PostgreSQL
by sborden76
7M ago
In my new role at Google, not only am I still working with lots of Oracle and replication tools, I am also expanding more into moving Oracle systems to Google Cloud on either CloudSQL for PostgreSQL or AlloyDB for PostgreSQL. After you have been looking at the systems for a little bit of time, there seem to be a few things worth tweaking from the out of the box values. It is my goal to discuss some of those things now and in future blog posts. Let me start off by saying managed PostgreSQL CloudSQL products such as Google’s CloudSQL for PostgreSQL and AlloyDB for PostgreSQL (in Preview as of t ..read more
Visit website

Follow Shane Borden's Technology Blog » PostgreSQL on FeedSpot

Continue with Google
Continue with Apple
OR