PostgreSQL Table Partitioning Part II – Declarative Partitioning

Starting Postgres 10.x and onward, it is now possible to create declarative partitions.

In my previous post ‘postgresql-table-partitioning-part-i-implementation-using-inheritance‘, I discussed about implementing Partitioning in PostgreSQL using ‘Inheritance’. Up until PostgreSQL 9, it was only way to partition tables in PostgreSQL. It was simple to implement, however had some limitations like:

Continue reading “PostgreSQL Table Partitioning Part II – Declarative Partitioning”

PostgreSQL Table Partitioning Part I – Implementation Using Inheritance

In earlier PostgreSQL versions, it was not possible to declare table partitions syntactically. Partitioning can be implemented using table inheritance. The inheritance approach involves creating a single parent table and multiple child tables (aka. Partitions) to hold data in each partition range.

In this post, I’ll discuss the implementation of table partitions using inheritance. However before proceeding, let’s first understand why do we need partitioning? Continue reading “PostgreSQL Table Partitioning Part I – Implementation Using Inheritance”

PostgreSQL-Diagnostic-Queries

psql queries to quickly Identify & resolve database performance problems

As a seasoned data store engineer, I often find myself in situations where a production application is down due to some sort of performance issue and I am being asked “What’s wrong with the database?”. In almost all these situations, the database (along with the DBA) is automatically considered guilty until proven innocent. As a DBA, I need the tools and knowledge to help quickly determine the actual problem, if there is one, because maybe there’s nothing wrong with the database or the database server. My favorite approach to start with data driven performance analysis using  PostgreSQL systems catalog

In below post, I am sharing bunch of PostgreSQL system catalog queries that can be used to troubleshoot database engine performance

Postgres system catalogs are a place where database management system stores schema metadata, such as information about tables and columns, and internal bookkeeping information. PostgreSQL’s system catalogs are regular tables.

Continue reading “PostgreSQL-Diagnostic-Queries”

“Hit Refresh” Book Review – Transforming Microsoft with a growth mindset 📚

“A mind needs books as a sword needs a whetstone, if it is to keep its edge. – George R.R. Martin”

516+-p6YgoL

Yes, I admit that I sort of dropped the ball on reading. What was more surprising is that all this while I almost did nothing to correct it. Fortunately sanity prevailed and my wife who herself is a voracious reader and a writer (though her first masterpiece is still in making) help me remind about all the good things I am missing by not reading. So I picked up books again!

This blog is share reviews of whatever little I’ve read and learn from your thoughts.

Continue reading ““Hit Refresh” Book Review – Transforming Microsoft with a growth mindset 📚”

Learning beyond SQL…PostgreSQL – Indexes

It’s been some time since I’ve blogged, even though I’ve been reading a lot all this while. One of the reason is that I couldn’t find enough compelling topics to write and share. Microsoft has been moving too fast with their SQL Server releases (2012, 2014, 2016….and we’re talking  Linux beta right now) and I’ve always been catching up.

However, between all this, something has changed. Due to an ever-growing buzz around Open Source, I haltingly started looking into PostgreSQL.  Truth be told, I’m starting from ground zero (so nothing to loose) and will be writing on topics that might sound too simple for some of you, nevertheless you may still find ’em helpful.

Continue reading “Learning beyond SQL…PostgreSQL – Indexes”

2014 – My Year in Books 📚

There is more treasure in books than in all the pirate’s loot on Treasure Island” – Walt Disney

2014 has been quite a year for me both personally and professionally. I’ve never been much of book reader as they’ve always reminded me of my school days when reading a book was like compromising on all other good things (some of my schoolmates can resonate to that). However things gradually changed (thanks to wife), and I started to read and ended up having an year far more richer than than one I started with.
Continue reading “2014 – My Year in Books 📚”

SQL-Saturday #116 – Question of the day: When does a GRANT overrides a DENY in SQL Server?

SQL_SAT

 

SQLSaturday #116 – Bangalore

WoW!! What a great day it was to learn and connect with SQL guru’s and like minded folks who carry same passion for SQL server as I do. It’s quite an honor to meet and listen @blakhani, @pinaldave, @banerjeeamit, @vinodk_sql, @kashyapa , Rick @Joes2Pros……You guys are truly inspirational
Continue reading “SQL-Saturday #116 – Question of the day: When does a GRANT overrides a DENY in SQL Server?”

Identify queries that consume a large amount of log space in SQL Server

One of regular issues DBA’s get are about the T-log growth. Situations, wherein one “bad”  or “poorly-designed” query can eat up entire T-log space, bring the free space to zero and then bring your application down. The cause and remedy of most these issue is discussed in this KB # 317375(I’m  big fan on Microsoft KB’s).

Continue reading “Identify queries that consume a large amount of log space in SQL Server”

What is a columnstore index?

Upcoming SQL Product, introduces a new data warehouse query acceleration feature based on a new type of index called columnstore. Before we move any further exploring this new feature, I want to take time to explain the basics behind a columnstore index and how different is it from a traditional index (rowstore).

Continue reading “What is a columnstore index?”

Hello world….once again

package main

import "fmt"

func main() {
    fmt.Println("hello world (^-^*)/")
}

This is continuation to my SQL Server blog on MSDN. With this blog post, I intend to help fellow database engineers community using PostgreSQL / SQL Server as a Database Platform, with occasional other stuff thrown in related to other RDBMS platforms and their respective integration issues. Thanks to my wife who’d been pestering me to blog for a year or so.

I’ve spent more than a decade working on various different RDBMS platforms including PostgreSQL, SQL Server, Oracle, MySQL. My current focus area is PostgreSQL and it’s implementation in a large enterprise landscape overcoming challenges of scale, manageability and automation.

Thanks for your time reading and I hope all my effort will help (or at least entertain) you at many levels. I would really appreciate if you could let me know what you think about it, good or bad. I always appreciate feedback 🙂

Sincere Thanks!

Varun