HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Row padding to get more performance

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
paddingmoregetperformancerow

Problem

I have read a document (Designing Highly Scalable OLTP Systems) that describe a trick how to get more performance:


Because rows are small (many fit a page) multiple locks may compete for one PAGELATCH.
We can ”waste” a bit of space to get more performance. Solution: Pad
rows with CHAR column to make each row take a full page.

Does anyone use this approach? What results have you got?

Thank you.

ADDED:

Warning. The linked article is not a guide to action. Thomas Kejser describes tests on terabyte-sized databases, no more.

Solution

I've only briefly scanned though the document but my first thought was "oh, a SQLCAT publication". These guys push out some fantastic material but much of their guidance is derived from the very extreme end of pushing the boundaries.

You can learn a great deal from reading about SQL Server behaviour in multi-million $$$ implementations but very little of it applies to typical installations. This particular document is the result of testing a 10k/tps, 256 core, 500 spindle system.

In the real world where you aren't pushing SQL Server internals beyond their anticipated limits, these are interesting diversions, not recommendations.

Your question is perhaps somewhat dangerous. A casual passer by may read your question, briefly scan the linked document and conclude that padding rows to fill a page is a good idea.


If I have 256 cores and 500 disks delivering 18GB/sec but I'm seeing
PAGELATCH_EX waits for my highly specialised workload xyz, will I
increase throughput by padding rows to fill a page?

Yes. As Thomas Kejser has demonstrated.


Should we all be doing the same?

Absolutely not!

Context

StackExchange Database Administrators Q#5270, answer score: 6

Revisions (0)

No revisions yet.