Operation Cost

12 views
Skip to first unread message

Rohit Manohar

unread,
Aug 2, 2011, 6:51:29 PM8/2/11
to terrastore-discussions
Hi

I have a use-case. To delete a number of files that are named in a
logical manner: foo1, foo2, foo3 ...

Which is better (less costly) :
1. Do a GET using a range query and then delete one by one

2. Do a DELETE on a range query.

Cheers!
Rohit Manohar

Sergio Bossa

unread,
Aug 3, 2011, 7:37:33 AM8/3/11
to terrastore-...@googlegroups.com
The range delete is surely faster, but you'll be better to check out
the actually deleted keys from the returned array, or assume some keys
may have not been deleted (.i.e. because part of the ensemble was
unavailable or the key didn't actually exist).
On the other side, with a range get followed by a one-by-one delete,
you could immediately know each delete response.

That's the tradeoff.
Hope that helps,
Cheers,

Sergio B.

--
Sergio Bossa
http://www.linkedin.com/in/sergiob

Reply all
Reply to author
Forward
0 new messages