I would like to evaluate how storage queries are scaled in Windows Azure Table. To this end, I put together a simple test environment where I can increase the amount of data in my table and measure the query execution time. And depending on the time that I would like to define a cost function that can be used to evaluate the performance of future requests.
I rated the following queries:
- Request with PartitionKey and RowKey
- Request with PartitionKey and attribute
- Request with PartitionKey and two RowKeys
- Request with PartitionKey and two attributes
For the last two queries, I checked the following two patterns:
- PartitionKey == "..." && (RowKey == "..." || RowKey == "...")
- (PartitionKey == "..." && RowKey == "...") || (PartitionKey == "..." && RowKey == "...")
To minimize transmission delay, I ran a test using the Azure example. From the measurements, I see that
- query 1 (not surprisingly, since the table is indexed based on these fields) is extremely fast, it takes about 10-15 ms if I have about 150,000 records in the table.
- query 2 requires scanning partitions, so the execution time increases linearly with the stored data.
- query 3.1 performs almost exactly like query 2. Thus, this query also runs with a full section scan, which seems a little strange to me.
- query 4.1 is slightly more than twice as slow as query 3.1. Thus, it seems that it is evaluated using two sections.
- and finally, queries 3.2 and 4.2 execute almost exactly 4 times slower than query 2.
Can you explain the interiors of the query / filter interpreter? Even if we agree that query 3.1 needs to scan partitions, query 4.1 can also be evaluated using the same logic (and at the same time). Query 3.2 and 4.2 seems a mystery to me. Any pointers to them?
Obviously, the whole point is that I would like to request individual elements in one query in order to minimize costs without losing performance. But it seems that using separate queries (with a parallel task library) for each element is the only real quick solution. What is an acceptable way to do this?
Tamas source share