Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
PostgreSQL 9.0 High Performance
PostgreSQL 9.0 High Performance

PostgreSQL 9.0 High Performance: If you’re an intermediate to advanced database administrator, this book is the shortcut to optimizing and troubleshooting your PostgreSQL database. With a balanced mix of theory and practice, it will quickly hone your expertise.

eBook
$22.99 $32.99
Paperback
$54.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

PostgreSQL 9.0 High Performance

pgmemcache

If you can resolve the page invalidation problem in a more general way, it's possible to use memcached as an intermediary for database queries too. When a user on a web site is grabbing their own data over and over, but not modifying it, you should be able to figure out how to cache database lookups related to their data usefully. Then you just need to be careful to throw those pages out if the data is modified.

The way to do that in PostgreSQL is quite straightforward: simply add a pair of triggers for AFTER UPDATE ON and AFTER DELETE ON for any table you are storing in the cache. If you take care of that, you can use the pgmemcache program from http://pgfoundry.org/projects/pgmemcache/ in order to handle the routine chores of setting up memcached for storing database information.

Note

There is a second program with the confusingly similar name of pgmemcached that was a development effort related to PostgreSQL/memcached integration. This project was completed and abandoned...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Learn the right techniques to obtain optimal PostgreSQL database performance, from initial design to routine maintenance
  • Discover the techniques used to scale successful database installations
  • Avoid the common pitfalls that can slow your system down
  • Filled with advice about what you should be doing; how to build experimental databases to explore performance topics, and then move what you've learned into a production database environment
  • Covers versions 8.1 through 9.0

Description

PostgreSQL database servers have a common set of problems they encounter as their usage gets heavier and requirements more demanding. You could spend years discovering solutions to them all, step by step as you encounter them. Or you can just look in here.All successful database applications are destined to eventually run into issues scaling up their performance. Peek into the future of your PostgreSQL database's problems today. Know the warning signs to look for, and how to avoid the most common issues before they even happen.Surprisingly, most PostgreSQL database applications evolve in the same way: Choose the right hardware. Tune the operating system and server memory use. Optimize queries against the database, with the right indexes. Monitor every layer, from hardware to queries, using some tools that are inside PostgreSQL and others that are external. Using monitoring insight, continuously rework the design and configuration. On reaching the limits of a single server, break things up; connection pooling, caching, partitioning, and replication can all help handle increasing database workloads. The path to a high performance database system isn't always easy. But it doesn't have to be mysterious with the right guide.

Who is this book for?

This book is aimed at intermediate to advanced database administrators using or planning to use PostgreSQL. Portions will also interest systems administrators looking to build or monitor a PostgreSQL installation, as well as developers interested in advanced database internals that impact application design.

What you will learn

  • Learn best practices culled from years of work scaling PostgreSQL installations to handle demanding applications
  • Uncover what makes hardware good or bad for high-performance database applications
  • Investigate making informed speed and reliability trade-offs
  • Tweak your operating system for best database performance
  • Benchmark your whole system from hardware to application
  • Learn how the server parameters that impact performance work using real examples
  • Understand how the query optimizer makes its decisions, and what to do when it makes the wrong ones
  • Monitor what happens on your server, both in and outside of the database
  • Find the best add-on tools that extend the core PostgreSQL database
  • Discover how to architect replicated systems using the latest features added to PostgreSQL 9.0

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Oct 20, 2010
Length: 468 pages
Edition : 1st
Language : English
ISBN-13 : 9781849510301
Vendor :
PostgreSQL Global Development Group
Category :
Languages :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Oct 20, 2010
Length: 468 pages
Edition : 1st
Language : English
ISBN-13 : 9781849510301
Vendor :
PostgreSQL Global Development Group
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 158.97
PostgreSQL Server Programming
$54.99
PostgreSQL 9.0 High Performance
$54.99
PostgreSQL 9 High Availability Cookbook
$48.99
Total $ 158.97 Stars icon
Banner background image

Table of Contents

119 Chapters
What this book covers Chevron down icon Chevron up icon
What you need for this book Chevron down icon Chevron up icon
Who this book is for Chevron down icon Chevron up icon
Conventions Chevron down icon Chevron up icon
Reader feedback Chevron down icon Chevron up icon
Customer support Chevron down icon Chevron up icon
Chapter 1. PostgreSQL Versions Chevron down icon Chevron up icon
Performance of historical PostgreSQL releases Chevron down icon Chevron up icon
PostgreSQL or another database? Chevron down icon Chevron up icon
PostgreSQL tools Chevron down icon Chevron up icon
PostgreSQL application scaling lifecycle Chevron down icon Chevron up icon
Performance tuning as a practice Chevron down icon Chevron up icon
Summary Chevron down icon Chevron up icon
Chapter 2. Database Hardware Chevron down icon Chevron up icon
Balancing hardware spending Chevron down icon Chevron up icon
Reliable controller and disk setup Chevron down icon Chevron up icon
Summary Chevron down icon Chevron up icon
Chapter 3. Database Hardware Benchmarking Chevron down icon Chevron up icon
CPU and memory benchmarking Chevron down icon Chevron up icon
Physical disk performance Chevron down icon Chevron up icon
Disk benchmarking tools Chevron down icon Chevron up icon
Sample disk results Chevron down icon Chevron up icon
Summary Chevron down icon Chevron up icon
Chapter 4. Disk Setup Chevron down icon Chevron up icon
Maximum filesystem sizes Chevron down icon Chevron up icon
Filesystem crash recovery Chevron down icon Chevron up icon
Linux filesystems Chevron down icon Chevron up icon
Solaris and FreeBSD filesystems Chevron down icon Chevron up icon
Windows filesystems Chevron down icon Chevron up icon
Disk layout for PostgreSQL Chevron down icon Chevron up icon
Summary Chevron down icon Chevron up icon
Chapter 5. Memory for Database Caching Chevron down icon Chevron up icon
Inspecting the database cache Chevron down icon Chevron up icon
Crash recovery and the buffer cache Chevron down icon Chevron up icon
Database buffer cache versus operating system cache Chevron down icon Chevron up icon
Analyzing buffer cache contents Chevron down icon Chevron up icon
Summary Chevron down icon Chevron up icon
Chapter 6. Server Configuration Tuning Chevron down icon Chevron up icon
Interacting with the live configuration Chevron down icon Chevron up icon
Server-wide settings Chevron down icon Chevron up icon
Per-client settings Chevron down icon Chevron up icon
New server tuning Chevron down icon Chevron up icon
Dedicated server guidelines Chevron down icon Chevron up icon
Shared server guidelines Chevron down icon Chevron up icon
pgtune Chevron down icon Chevron up icon
Summary Chevron down icon Chevron up icon
Chapter 7. Routine Maintenance Chevron down icon Chevron up icon
Transaction visibility with multiversion concurrency control Chevron down icon Chevron up icon
Vacuum Chevron down icon Chevron up icon
Autoanalyze Chevron down icon Chevron up icon
Index bloat Chevron down icon Chevron up icon
Detailed data and index page monitoring Chevron down icon Chevron up icon
Monitoring query logs Chevron down icon Chevron up icon
Summary Chevron down icon Chevron up icon
Chapter 8. Database Benchmarking Chevron down icon Chevron up icon
pgbench default tests Chevron down icon Chevron up icon
Running pgbench manually Chevron down icon Chevron up icon
Graphing results with pgbench-tools Chevron down icon Chevron up icon
Sample pgbench test results Chevron down icon Chevron up icon
Sources for bad results and variation Chevron down icon Chevron up icon
pgbench custom tests Chevron down icon Chevron up icon
Transaction Processing Performance Council benchmarks Chevron down icon Chevron up icon
Summary Chevron down icon Chevron up icon
Chapter 9. Database Indexing Chevron down icon Chevron up icon
Indexing example walkthrough Chevron down icon Chevron up icon
Index creation and maintenance Chevron down icon Chevron up icon
Index types Chevron down icon Chevron up icon
Advanced index use Chevron down icon Chevron up icon
Summary Chevron down icon Chevron up icon
Chapter 10. Query Optimization Chevron down icon Chevron up icon
Sample data sets Chevron down icon Chevron up icon
EXPLAIN basics Chevron down icon Chevron up icon
Query plan node structure Chevron down icon Chevron up icon
Explain analysis tools Chevron down icon Chevron up icon
Assembling row sets Chevron down icon Chevron up icon
Processing nodes Chevron down icon Chevron up icon
Joins Chevron down icon Chevron up icon
Statistics Chevron down icon Chevron up icon
Other query planning parameters Chevron down icon Chevron up icon
Executing other statement types Chevron down icon Chevron up icon
Improving queries Chevron down icon Chevron up icon
SQL Limitations Chevron down icon Chevron up icon
Summary Chevron down icon Chevron up icon
Chapter 11. Database Activity and Statistics Chevron down icon Chevron up icon
Statistics views Chevron down icon Chevron up icon
Cumulative and live views Chevron down icon Chevron up icon
Table statistics Chevron down icon Chevron up icon
Index statistics Chevron down icon Chevron up icon
Database wide totals Chevron down icon Chevron up icon
Connections and activity Chevron down icon Chevron up icon
Locks Chevron down icon Chevron up icon
Disk usage Chevron down icon Chevron up icon
Buffer, background writer, and checkpoint activity Chevron down icon Chevron up icon
Summary Chevron down icon Chevron up icon
Chapter 12. Monitoring and Trending Chevron down icon Chevron up icon
UNIX monitoring tools Chevron down icon Chevron up icon
Windows monitoring tools Chevron down icon Chevron up icon
Trending software Chevron down icon Chevron up icon
Summary Chevron down icon Chevron up icon
Chapter 13. Pooling and Caching Chevron down icon Chevron up icon
Connection pooling Chevron down icon Chevron up icon
Database caching Chevron down icon Chevron up icon
Summary Chevron down icon Chevron up icon
Chapter 14. Scaling with Replication Chevron down icon Chevron up icon
Hot Standby Chevron down icon Chevron up icon
Replication queue managers Chevron down icon Chevron up icon
Special application requirements Chevron down icon Chevron up icon
Other interesting replication projects Chevron down icon Chevron up icon
Summary Chevron down icon Chevron up icon
Chapter 15. Partitioning Data Chevron down icon Chevron up icon
Table range partitioning Chevron down icon Chevron up icon
Horizontal partitioning with PL/Proxy Chevron down icon Chevron up icon
Summary Chevron down icon Chevron up icon
Chapter 16. Avoiding Common Problems Chevron down icon Chevron up icon
Bulk loading Chevron down icon Chevron up icon
Common performance issues Chevron down icon Chevron up icon
Profiling the database Chevron down icon Chevron up icon
Performance related features by version Chevron down icon Chevron up icon
Summary Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.5
(24 Ratings)
5 star 66.7%
4 star 20.8%
3 star 12.5%
2 star 0%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Leo Hsu Dec 30, 2010
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I've also read the companion PostgreSQL 9 Admin Cookbook. The Admin cookbook is an easier read, but this book had a lot more information I was unaware of and probably hit my weaker knowledge spots. There is very little overlap between the two books.What surprised me most about this book was how much of it is not specific to PostgreSQL, but in fact hardware considerations and testing that are pertinent to most relational databases. In that sense I wouldn't limit my recommendation to just PostgreSQL, but also to anyone using a relational database on Unix/Linux for a high load project.The PostgreSQL 9 High Performance book isn't going to teach you too much about writing better queries,day to day management (which is more of the focus of the Admin Book), or how to load data etc, but it will tell you how to determine when your database is under stress or your hardware is failing and adversely affecting your queries and what is causing that stress. It will also provide rules of thumb as to how to pick the best hardware for your project and budget, how to partition your data, what disks to put what kind of data. Various tuning and benchmarking techniques for highload testing.
Amazon Verified review Amazon
Torsten Sep 20, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Nur einige Highlights:Viele glauben je mehr shared memory eine Datenbank hat, desto besser. Falsch! Greg erklärt wieso und welche durchaus negativen Effekte zu viel shared memory hat.In meiner Datenbank hatte ich eine Tabelle, für die der Planner je nach Parameterkombination eines Selects sehr unterschiedliche Pläne erzeugen konnte. Bevor ich das Buch gelesen hatte, hatte ich mit den verschiedenen Cost-Parametern gespielt, ohne Erfolg. Um den idealen Plan zu erzwingen, konnte ich je nach Parameterkombination entweder seqscans verbieten, oder Hashjoins oder Ähnliches. Eine andere Möglichkeit den Planner zur Benutzung bestimmter Idizes zu bewegen, war ein spezieller Tablespace mit anderen Cost-Parametern für diese Indizes. Nach dem Lesen des Buches, war mir klar, wo der Fehler lag und welche Schraube zu drehen ist, ohne zu solchen Tricks zu greifen.Greg beleuchtet alle Bereiche, die für die Performance einer Postgres DB entscheidend sind, angefangen von der Hardware über Platten/RAID, das Betriebssytem und die Auswahl des Filesystems bis hin zu den Konfigurationsparametern natürlich. Ich hätte mir mehr über SSD und z.B. BTRFS gewünscht. Das Buch wurde jedoch schon 2010 veröffentlicht. Damals gab es einfach nicht genügend Erfahrung.Sicher findet man all die Information in dem Buch auch irgendwo im Internet. Doch auf diese Weise dauert es einfach deutlich länger, bis man versteht. Das Buch gehört definitiv in das Regal eines jeden Postgres Admins, der mehr als ein paar hundert MB an Daten zu verwalten hat.
Amazon Verified review Amazon
Bartosz Bilicki Jun 12, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Excellent book. Very well written and pleasant to read.Provides a lot of details that help to actually understand what is going on in database. Every performance/optimization technique, configuration flag is explained in detail.First half of the book covers thinks like choosing hardware, processor, memory, disk, file system, RAID matrix ,etc. In spite of the fact that I am java programmer, not DB engineer I find this part interesting too; it is good to know how database does its job.Somewhat old (addresses postgreSQL 9.0 and older versions, we have 9.4 now), but I see no parts that are outdated. PostgreSQL have not changed that much (you may read release notes for 9.1-9.4) and basic principles (that are explained very well, in length and in great detail) are not to change anytime soon.
Amazon Verified review Amazon
Vinicius Osiro Sep 15, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
👍🏽
Amazon Verified review Amazon
Christian Schmitt Jan 19, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Momentan gibt es kaum bessere Bücher um das beste aus einer Datenbank herauszuholen.PostgreSQL 9.0 High Performance hat mir sehr geholfen mehr über PostgreSQL zu erfahren und auch meine Applikationslogiken zu optimieren.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.