Hi all,
I faced an strange scenario in a simple query on Redshift and i'm trying to understand if this is a bug or normal (i dont think so) behavior:
My query (for example only):
SELECT *
FROM table
WHERE id = 'UUID'
ORDER BY date DESC
LIMIT 1
This query, for some unknown reason are returning all records matching with WHERE clause but discarding order by and limit clauses.
Even on "explain" from query editor it is not being considered.
However if change the query to something like this:
SELECT *
FROM table
WHERE id LIKE 'UUID'
ORDER BY date DESC
LIMIT 1
Basically changing the operator "=" per "LIKE" in WHERE clause my query works fine, the response returns only a specified limited records ordered correctly.
Some hints: this strange behavior only happened in my tests when the parameter in WHERE clause is a string DistKey with UUID content