title: What is the difference between scan and query in dynamodb? When use scan / query?
body: <p>A query operation as specified in DynamoDB documentation:</p>
  <blockquote>
  <p>A query operation searches only primary key attribute values and supports a subset of comparison operators on key attribute values to refine the search process.</p>
  </blockquote>
  <p>and the scan operation:</p>
  <blockquote>
  <p>A scan operation scans the entire table. You can specify filters to apply to the results to refine the values returned to you, after the complete scan.</p>
  </blockquote>
  <p>Which is best based on performance and cost?</p>