flux
flux

Reputation: 1638

Azure Table Storage cheapest way to find out if table has data

Background: As part of our table design for storing logs we are creating new tables each day. A function will run daily to create these tables. However there is no guarantee the tables will be used on that day. Therefore the function will also delete the previous day's table if there are no rows.

What is the cheapest way to check if table has data? Potential partition and row keys could be quite a lot to check for.

Upvotes: 0

Views: 53

Answers (1)

kwill
kwill

Reputation: 10998

What is the cheapest way to check if table has data? Potential partition and row keys could be quite a lot to check for.

You can simply query the table and fetch just a single entity with $top=1.

Upvotes: 3

Related Questions