1

I have been using boto.dynamodb for a couple of years but recently found that I need to put lists and maps into my DynamoDB table so I decided to switch over to boto.dynamodb2.

However, in attempting to do so I found that the performance for dynamodb2 was significantly slower. I am curious as to if this should be expected and if so what is the benefit to moving to dynamodb2 (assuming I don't need to use any of DyanomoDBs newer functions).

In the test below, I utilized some timing code from Python time measure function

@timing
def test1():
    logs = aws_conn.query(old_table, hash_key=88, attributes_to_get=attribs)
    return list(logs)


@timing
def test2():
    logs = log_table.query_2(key__eq=88, attributes_to_get=attribs)
    return list(logs)


# >>> logs1 = test1()  # dynamodb.layer2.query for 90705 objects
# test1 function took 60063.000 ms
# >>> logs2 = test2()   # dynamodb.table.query_2 for 90706 objects
# test2 function took 164971.000 ms
Community
  • 1
  • 1
user1601333
  • 151
  • 1
  • 10

0 Answers0