# Iceberg LOCALSORT and PARTITION can't speed up Dremio Queries

**URL:** <https://community.dremio.com/t/iceberg-localsort-and-partition-cant-speed-up-dremio-queries/11421>\
**Category:** Dremio University\
**Created:** [January 22, 2024, 10:20am UTC](https://community.dremio.com/t/iceberg-localsort-and-partition-cant-speed-up-dremio-queries/11421 "2024-01-22T10:20:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alaw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/alaw/32/4175_2.png) [@alaw](https://community.dremio.com/u/alaw)\
**Post date:** [January 22, 2024, 10:20am UTC](https://community.dremio.com/t/iceberg-localsort-and-partition-cant-speed-up-dremio-queries/11421/1 "2024-01-22T10:20:18Z")

</div>

Hi all,

I am using version 23.1.50. I have created an Icerberg file using Dremio CTAS with LOCALSORT and PARTITION. However, when I try to run a query against that files, seems that the localsort and partition can’t benefit the queries as similar setting in Reflection. Do anyone have similar experience? Thanks.

---

<div class="post-metadata">

**Author:** ![Jamark](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/jamark/32/4690_2.png) [@Jamark](https://community.dremio.com/u/Jamark)\
**Post date:** [January 22, 2024, 5:20pm UTC](https://community.dremio.com/t/iceberg-localsort-and-partition-cant-speed-up-dremio-queries/11421/2 "2024-01-22T17:20:28Z")

</div>

Hi @alaw, Can you post the query / queries profiles? I am specifically curious about the SELECT query on the localsort + partitioned table.

---

<div class="post-metadata">

**Author:** ![alaw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/alaw/32/4175_2.png) [@alaw](https://community.dremio.com/u/alaw)\
**Post date:** [January 23, 2024, 10:11am UTC](https://community.dremio.com/t/iceberg-localsort-and-partition-cant-speed-up-dremio-queries/11421/3 "2024-01-23T10:11:42Z")

</div>

I created the iceberg file using CTAS, you might refer to [CREATE | Dremio Documentation](https://docs.dremio.com/current/reference/sql/commands/apache-iceberg-tables/apache-iceberg-create#syntax)

for select, just normal SQL and found that the localsort and partition seems not recognized nor used by Dremio.

---

<div class="post-metadata">

**Author:** ![Jamark](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/jamark/32/4690_2.png) [@Jamark](https://community.dremio.com/u/Jamark)\
**Post date:** [January 23, 2024, 5:03pm UTC](https://community.dremio.com/t/iceberg-localsort-and-partition-cant-speed-up-dremio-queries/11421/4 "2024-01-23T17:03:54Z")

</div>

@alaw, could you provide the query statement or the _profile_ of the query? In your dremio, you can download each query’s profile under the ‘jobs’. Then Select the query your executed, and hit ‘download profile’ at the bottom of the ‘summary’ section.

* * *

Are you including a WHERE clause specifically on the column(s) that you perform your Sort Order / Partition on?
