Using psycopg2 to Connect Python to PostgreSQL
Learn how to connect to a PostgreSQL database from Python with this popular library.
2025-09-02 (first published: 2025-08-25)
2,399 reads
Learn how to connect to a PostgreSQL database from Python with this popular library.
2025-09-02 (first published: 2025-08-25)
2,399 reads
In web app development company boardrooms, architects and engineers are debating old assumptions. Scaling up isn’t just about faster servers or better caching anymore. It’s about reshaping how systems think. CQRS (Command Query Responsibility Segregation) and Event Sourcing are no longer fringe ideas. They’re becoming default choices in high-concurrency systems where consistency, auditability, and performance […]
2025-09-02 (first published: 2025-08-06)
673 reads
Overview In SQL Server, indexing is a technique used to improve the performance of queries by reducing the amount of data that SQL Server needs to scan. You can think of it like a table of contents in a book—it helps SQL Server find data more quickly. In this article, we will cover the following […]
2025-09-02 (first published: 2025-08-07)
4,919 reads
Evolution of code The thing with any bit of code that has been around for a while, is that when change comes along, the tendency is to cater for the change by adding new stuff, while nothing gets taken away. Some stuff has definitely been taken away from this Date Dimension, but some historical artefacts […]
2025-09-02 (first published: 2025-08-05)
3,052 reads
Introduction Sometimes we face the scenario in an enterprise environment that the database in SQL Server Always On Availability Group (AOAG) has high concurrency read and write access from application servers. If we keep using the one network interface card for both network traffic of database connections from application servers and database mirroring between AOAG […]
2025-09-01 (first published: 2023-05-08)
6,208 reads
Helping people solve T-SQL problems is one of my favorite hobbies. Someone messaged me the other day with a complex query that was almost complete except for one issue. He needed to perform a LEFT OUTER JOIN but had to filter based on a value from the right table. However, when he added the filter, SQL removed rows from the left table. The task was to decide where to place the SQL predicate: in the ON or WHERE clause.
2025-09-01
Learn about delayed durability in SQL Server and how it might help you with a heavily loaded server.
2025-08-29
8,951 reads
In Part 2, we shift focus from theory to practice. We will explore how organizations can harmoniously integrate both practi: the agility of DevOps and the resilience of SRE. During integration, it requires deliberate changes to culture, tooling, metrics, and collaboration patterns.
2025-08-29
Here's a teaser about Azure SQL Managed Instance, which isn't quite PaaS or IaaS, but isn't as locked down as you might think. This is the introduction to a three part series to follow.
2025-08-27 (first published: 2025-06-18)
3,810 reads
We are deploying a new application that uses PostgreSQL database. My manager has asked me to design high availability into the implementation. As a SQL Server database administrator, I’ve been managing PostgreSQL databases for a while. However, I’m not sure which high availability options to implement. What are the different high availability options for PostgreSQL?
2025-08-27
It is Friday, the queries are running, and nobody is watching the bill. That...
By Steve Jones
Annabel retired from Redgate Software this week. Across most of my career at Redgate,...
By Tim Radney
As a SQL Server DBA with years of experience tuning production environments, I’ve seen...
Comments posted to this topic are about the item What is the Cloud?
Comments posted to this topic are about the item Changing the Schema
Comments posted to this topic are about the item Index Fragmentation Explained: Page Splits,...
I set up a few users on my SQL Server 2022 instance.
CREATE LOGIN User1 WITH PASSWORD = 'Demo12#1' CREATE USER User1 FOR LOGIN User1 GO CREATE LOGIN User2 WITH PASSWORD = 'Demo12#2' CREATE USER User2 FOR LOGIN User2 GO CREATE LOGIN User3 WITH PASSWORD = 'Demo12#3' CREATE USER User3 FOR LOGIN User3 GOI then created a schema that one of them owned. Under this schema, I added a table with some data.
CREATE SCHEMA MySchema AUTHORIZATION User1
GO
CREATE TABLE Myschema.MyTable(myid INT)
GO
INSERT MySchema.MyTable
(
myid
)
VALUES
(1), (2), (3)
GO
SELECT * FROM MySchema.MyTable
GO
I granted rights and verified that User2 could access this table.
GRANT SELECT ON Myschema.MyTable TO User2 GO SETUSER 'USER2' GO SELECT * FROM MySchema.MyTable GOThis worked. Now, I move this schema to a new user.
ALTER AUTHORIZATION ON SCHEMA::Myschema TO User3; GOWhat happens with this code?
SETUSER 'USER2' GO SELECT * FROM MySchema.MyTable GOSee possible answers