postgresql @ highscalability.com
as you perhaps know there is this site/blog called high scalability. it contains articles about various things related to performance, scalability, availability and so on. usually, when there is...
View ArticleCounting number of distinct elements
When I was working for one of customers we found some strange thing. We needed to found number of distinct sessions per day. Table layout was very simple: Table "public.some_test_table" Column | Type |...
View ArticleWaiting for 8.4 – suppress_redundant_updates_trigger
On 3rd of November Andrew Dunstan committed his patch which adds new function to PostgreSQL – suppress_redundant_updates_trigger(). This function is not for using in selects, but it can help you...
View ArticleWaiting for 8.5 – Multi-threaded pgbench
On 3rd of August, Tatsuo Ishii committed patch by ITAGAKI Takahiro: Log Message: ----------- Multi-threaded version of pgbench contributed by ITAGAKI Takahiro, reviewed by Greg Smith and Josh Williams....
View ArticleProfiling stored procedures/functions
One database that I am monitoring uses a lot of stored procedures. Some of them are fast, some of them are not so fast. I thought – is there a sensible way to diagnose which part of stored procedure...
View ArticleShould you use HASH index?
Today, Mattias|farm on IRC asked how to create primary key using HASH index. After some talk, he said that in some books it said that for “=" (equality) hash indexes are better. So, I digged a bit...
View ArticlePerformance gains from using foreign keys
Foreign keys are known for couple of things, but speeding up your system is not one of them. But sometimes, having them in place lets you make queries significantly faster. How? Let me show you example...
View ArticleWhy I’m not fan of TSearch?
Before I'll start let me say that I am fan of what Oleg and Teodor did – their work is great, and I do appreciate their time and ideas. But – I simply don't like the idea of using FTS (Full Text...
View ArticleUnderstanding postgresql.conf : checkpoint_completion_target
Starting new blog series – explanation of various configuration parameters. I will of course follow no schedule or order – if I'd had to – it would be my job, and in this way – it's fun. First...
View ArticleWaiting for 9.1 – KNNGIST
On 4th of December, Tom Lane committed really cool patch: KNNGIST, otherwise known as order-by-operator support for GIST. This commit represents a rather heavily editorialized version of Teodor's...
View ArticleWaiting for 9.1 – Unlogged tables
On 29th of December, Robert Haas committed interesting patch, which does: Support unlogged tables. The contents of an unlogged table aren't WAL-logged; thus, they are not available on standby servers...
View ArticleWaiting for 9.1 – Faster LIKE/ILIKE
On 1st of February, Tom Lane committed patch: Support LIKE and ILIKE index searches via contrib/pg_trgm indexes. Unlike Btree-based LIKE optimization, this works for non-left-anchored search...
View ArticleWhat index to create?
Some time ago I wrote a blogpost about why index might not be used. While this post seemed to be well received (top link from depesz.com on reddit), it doesn't answer another question – what index to...
View ArticleWaiting for 9.2 – pg_stat_statements improvements
Three interesting patches: On 27th of March, Robert Haas committed patch: New GUC, track_iotiming, to track I/O timings. Currently, the only way to see the numbers this gathers is via EXPLAIN...
View Article“= 123″ vs. “= ‘depesz’”. What is faster?
There is this idea that normal form in databases require you to use integer, auto incrementing, primary keys. The idea was discussed by many people, I will just point you to series of three blog posts...
View Article“= 123″ vs. “= ‘depesz’” – followup
Yesterday I wrote about selects on int4 vs. texts. One of the comments that caught my attention was question about index creation time. So, let's see… Before I will comment on sensibility of this test,...
View ArticleWhat is the point of bouncing?
Some of you might be familiar with pgBouncer project. Some are not. Some understand what/how/why it does, others do not. This blog post is to have a place where I can point people who have question...
View ArticleWaiting for 9.3 – Add parallel pg_dump option.
On 24th of March, Andrew Dunstan committed patch: Add parallel pg_dump option. New infrastructure is added which creates a set number of workers (threads on Windows, forked processes on Unix). Jobs...
View ArticleWaiting for 9.3 – Support indexing of regular-expression searches in...
On 9th of April, Tom Lane committed patch: Support indexing of regular-expression searches in contrib/pg_trgm. This works by extracting trigrams from the given regular expression, in generally the...
View ArticleWhat logging has least overhead?
When working with PostgreSQL you generally want to get information about slow queries. The usual approach is to set log_min_duration_statement to some low(ish) value, run your app, and then analyze...
View Article
More Pages to Explore .....