What is the best way to clear an Azure Table?

Answered What is the best way to clear an Azure Table?

  • Monday, December 20, 2010 3:52 AM
     
     

    Assume I have a big azure table storage, I want to clear it. as far as I know, I have two options

    1. Find all entities and delete them

    2. Delete the table, after a period of time, re-create it.

    The first option takes too long since I have so many entities in this table.

    The second option also need to wait because there is a period of waiting time before reuse the same table name.

     

    I am wondering is there a better solution for this?

All Replies

  • Monday, December 20, 2010 4:23 AM
     
     Answered

    No, there's no better solution for actually clearing the contents of a table.

    Some people use a new table name when they do this.  (If your code does something like ListTables("MyTableName").First() to get the first table that starts with that string, then you can "clear" the table by deleting the existing one and creating a new one called "MyTableName2" or "MyTableName_<guid>".)

    • Marked As Answer by KevinGZ Monday, December 20, 2010 4:24 AM
    •