1

I have fixed length binary range key in dynamodb schema. I want to retrieve results which satisfy binary operation in boto.

Like

In database we have range_key = 1010101010

I want to get the row which have 1 in forth bit of range_key

Thanks in advance

Sujit Maharjan
  • 421
  • 1
  • 7
  • 17

1 Answers1

1

Actually you can't do that... we have were investiganting the same approach a couple of months ago, and at the end we modified how we store our data. In our model we have in the key (key, and range) some "attributes" related to the items stored in the bitmaps like the one you are exposing. So, when we query we retrieve all the matching keys (for example, purchases done between the 1 and the 10 of October), and we do the bit wise operations in memory. It is quite fast ;)

Dani C.
  • 910
  • 7
  • 16
  • I have been doing that but its quite slow in my case I have a very large no. of rows and its difficult to filter them without performing bitwise-and at database level. – Sujit Maharjan Nov 28 '13 at 07:42