Monday, November 22, 2010 |
|
|
Determining how to divide your Azure table storage into
multiple partitions is based on how your data is accessed. Here is an example
of how to partition data assuming that reads predominate over writes.
Consider an application that sells tickets to various
events. Typical questions and the attributes accessed for the queries are:
How many tickets are left for an event? |
date, location, event |
What events occur
on which date?
|
date, artist,
location |
When is a particular
artist coming to town?
|
artist,
location |
When can I get a
ticket for a type of event?
|
genre
|
Which artists are
coming to town?
|
artist, location |
The queries are listed in frequency order. The most common
query is about how many tickets are available for an event.
The most common combination of attributes is artist or date
for a given location. The most common query uses event, date, and location.
With Azure tables you only have two keys: partition and row.
The fastest query is always the one based on the partition key.
This leads us to the suggestion that the partition key
should be location since it is involved with all but one of the queries. The
row key should be date concatenated with event. This gives a quick result for
the most common query. The remaining queries require table scans. All but one are
helped by the partitioning scheme. In reality, that query is probably location
based as well.
The added bonus of this arrangement is that it allows for geographic
distribution to data centers closest to the customers.
|
|
|
|
|
|
|
|
Archive |
April, 2013 (1) |
March, 2013 (1) |
July, 2012 (1) |
June, 2012 (1) |
May, 2012 (3) |
March, 2012 (2) |
February, 2012 (1) |
January, 2012 (1) |
October, 2011 (1) |
May, 2011 (1) |
January, 2011 (1) |
December, 2010 (1) |
November, 2010 (1) |
September, 2010 (2) |
August, 2010 (1) |
July, 2010 (1) |
March, 2010 (1) |
December, 2009 (2) |
November, 2009 (3) |
October, 2009 (2) |
August, 2009 (2) |
July, 2009 (1) |
June, 2009 (2) |
May, 2009 (3) |
January, 2009 (3) |
October, 2008 (1) |
September, 2008 (2) |
August, 2008 (1) |
June, 2008 (1) |
April, 2008 (1) |
March, 2008 (3) |
February, 2008 (2) |
January, 2008 (1) |
November, 2007 (1) |
October, 2007 (1) |
August, 2007 (1) |
May, 2007 (1) |
October, 2006 (1) |
September, 2006 (2) |
August, 2006 (1) |
July, 2006 (1) |
June, 2006 (8) |
February, 2006 (1) |
November, 2005 (1) |
October, 2005 (1) |
August, 2005 (1) |
March, 2005 (2) |
December, 2004 (2) |
November, 2004 (1) |
August, 2004 (1) |
June, 2004 (2) |
March, 2004 (1) |
February, 2004 (1) |
|
|
|
|
Themes |
Pick a theme:
|
|
|
|