- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2022 03:48 AM
Is the order of the columns in ZORDER important? For example, does ZORDER BY (product, site) and ZORDER BY (site, product) produce the same results?
- Labels:
-
Question
-
Zorder
-
ZORDER Option
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2022 07:25 AM
It is not important, or at least way less important than with a linear order by.
I cannot guarantee that the resulting files will be exactly the same, but z-ordering is not the same as a classic order by where we first order by col1 and then col2 etc. It will interleave the order columns and aim for locality on this 'combined' column.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2022 07:25 AM
It is not important, or at least way less important than with a linear order by.
I cannot guarantee that the resulting files will be exactly the same, but z-ordering is not the same as a classic order by where we first order by col1 and then col2 etc. It will interleave the order columns and aim for locality on this 'combined' column.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2022 08:06 AM
thanks for the quick reply

