amazon-dynamodb-developer-guide icon indicating copy to clipboard operation
amazon-dynamodb-developer-guide copied to clipboard

Potentially wrong or confusing PartiQL example

Open pgrm opened this issue 3 years ago • 0 comments

Hello, I do not understand why this condition does NOT result in a full table scan:

https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/master/doc_source/ql-reference.select.md?plain=1#L53

SELECT * 
FROM Orders 
WHERE OrderID = 100 or pk = 200

is this a mistake in the example? or did I miss something?

couple lines below, there is the following example, which according to the docs results in a full table scan

SELECT * 
FROM Orders 
WHERE OrderID = 100 OR Address='some address'

Why exactly would or pk be ok, if OR Address is not? (I do understand why the second example does result in a full table scan, I'm just confused about the first one)

pgrm avatar Jul 26 '21 14:07 pgrm