You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/storage/tables/table-storage-design-patterns.md
+10-16Lines changed: 10 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -627,13 +627,13 @@ Consider the following points when deciding how to store log data:
627
627
628
628
## Implementation considerations
629
629
630
-
This section discusses some of the considerations to bear in mind when you implement the patterns described in the previous sections. Most of this section uses examples written in C# that use the Storage Client Library (version 4.3.0 at the time of writing).
630
+
This section discusses some of the considerations to bear in mind when you implement the patterns described in the previous sections. Most of this section uses examples written in C# that use the Storage client library (version 4.3.0 at the time of writing).
631
631
632
632
## Retrieving entities
633
633
634
-
As discussed in the section Design for querying, the most efficient query is a point query. However, in some scenarios you may need to retrieve multiple entities. This section describes some common approaches to retrieving entities using the Storage Client Library.
634
+
As discussed in the section Design for querying, the most efficient query is a point query. However, in some scenarios you may need to retrieve multiple entities. This section describes some common approaches to retrieving entities using the Storage client library.
635
635
636
-
### Executing a point query using the Storage Client Library
636
+
### Executing a point query using the Storage client library
637
637
638
638
The easiest way to execute a point query is to use the **GetEntityAsync** method as shown in the following C# code snippet that retrieves an entity with a **PartitionKey** of value "Sales" and a **RowKey** of value "212":
639
639
@@ -687,7 +687,7 @@ You should always fully test the performance of your application in such scenari
687
687
688
688
A query against the table service may return a maximum of 1,000 entities at one time and may execute for a maximum of five seconds. If the result set contains more than 1,000 entities, if the query did not complete within five seconds, or if the query crosses the partition boundary, the Table service returns a continuation token to enable the client application to request the next set of entities. For more information about how continuation tokens work, see [Query Timeout and Pagination](/rest/api/storageservices/Query-Timeout-and-Pagination).
689
689
690
-
If you are using the Table Client Library, it can automatically handle continuation tokens for you as it returns entities from the Table service. The following C# code sample using the Table Client Library automatically handles continuation tokens if the table service returns them in a response:
690
+
If you are using the Azure Tables client library, it can automatically handle continuation tokens for you as it returns entities from the Table service. The following C# code sample using the client library automatically handles continuation tokens if the table service returns them in a response:
@@ -755,12 +755,6 @@ By using continuation tokens explicitly, you can control when your application r
755
755
>
756
756
>
757
757
758
-
The following C# code shows how to modify the number of entities returned inside a segment:
759
-
760
-
```csharp
761
-
employees.max=50;
762
-
```
763
-
764
758
### Server-side projection
765
759
766
760
A single entity can have up to 255 properties and be up to 1 MB in size. When you query the table and retrieve entities, you may not need all the properties and can avoid transferring data unnecessarily (to help reduce latency and cost). You can use server-side projection to transfer just the properties you need. The following example retrieves just the **Email** property (along with **PartitionKey**, **RowKey**, **Timestamp**, and **ETag**) from the entities selected by the query.
@@ -780,9 +774,9 @@ Notice how the **RowKey** value is available even though it was not included in
ExceptionsthrownwhentheStorageClientLibraryexecutesanEGTtypicallyincludetheindexoftheentitythatcausedthebatchtofail. Thisishelpful when you are debugging code that uses EGTs.
779
+
ExceptionsthrownwhentheStorageclientlibraryexecutesanEGTtypicallyincludetheindexoftheentitythatcausedthebatchtofail. Thisishelpful when you are debugging code that uses EGTs.
Ifyouknowthetypeoftheentitystoredwithaspecific **RowKey** and **PartitionKey** values, thenyoucanspecifytheentitytypewhenyouretrievetheentityasshownintheprevioustwoexamplesthatretrieveentitiesoftype **EmployeeEntity**: [Executing a point query using the Storage Client Library](#executing-a-point-query-using-the-storage-client-library) and [Retrieving multiple entities using LINQ](#retrieving-multiple-entities-using-linq).
1004
+
Ifyouknowthetypeoftheentitystoredwithaspecific **RowKey** and **PartitionKey** values, thenyoucanspecifytheentitytypewhenyouretrievetheentityasshownintheprevioustwoexamplesthatretrieveentitiesoftype **EmployeeEntity**: [Executing a point query using the Storage client library](#executing-a-point-query-using-the-storage-client-library) and [Retrieving multiple entities using LINQ](#retrieving-multiple-entities-using-linq).
@@ -1059,7 +1053,7 @@ It is possible to generate a SAS token that grants access to a subset of the ent
1059
1053
Provided you are spreading your requests across multiple partitions, you can improve throughput and client responsiveness by using asynchronous or parallel queries.
1060
1054
For example, you might have two or more worker role instances accessing your tables in parallel. You could have individual worker roles responsible for particular sets of partitions, or simply have multiple worker role instances, each able to access all the partitions in a table.
1061
1055
1062
-
Within a client instance, you can improve throughput by executing storage operations asynchronously. The Storage Client Library makes it easy to write asynchronous queries and modifications. For example, you might start with the synchronous method that retrieves all the entities in a partition as shown in the following C# code:
1056
+
Within a client instance, you can improve throughput by executing storage operations asynchronously. The Storage client library makes it easy to write asynchronous queries and modifications. For example, you might start with the synchronous method that retrieves all the entities in a partition as shown in the following C# code:
0 commit comments