0
votes

Referring to the attached image of the query plan of the query I'm executing and created_time is Interleaved sort key which is used as a range filter on the data.

Though it \looks like seq scan is happening on the table data, the rows scanned column seems empty in the image, does that mean there is no scan happening, and the sort keys work?

Query plan

1

1 Answers

0
votes

Even though created_time is your sort key, in this query it is not recognized since you are converting it to date. Therefore, it is scanning entire table.

You need to leave it unmodified for it to know that it is the sort key.