# Running Query more than a hour

**URL:** https://community.dremio.com/t/running-query-more-than-a-hour/10124
**Category:** Uncategorized
**Created:** [January 4, 2023, 3:17am UTC](https://community.dremio.com/t/running-query-more-than-a-hour/10124 "2023-01-04T03:17:20Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Napoleon](https://avatars.discourse-cdn.com/v4/letter/n/58956e/32.png) [@Napoleon](https://community.dremio.com/u/Napoleon)
#### Post date: [January 4, 2023, 3:17am UTC](https://community.dremio.com/t/running-query-more-than-a-hour/10124/1 "2023-01-04T03:17:20Z")

</div>

Hello, I’m new using dremio and having a hard time running SQL query which joining 2 datasets.  
One of the datasets has like 600k rows and 100+ collumns and the other one has only 230K rows but has a comment-like column. I tried optimizing the query but it does not finished even more than a hour and still running.

How do I solve this problem?  
Thanks

---

<div class="post-metadata">

### Author: ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)
#### Post date: [January 5, 2023, 5:26am UTC](https://community.dremio.com/t/running-query-more-than-a-hour/10124/2 "2023-01-05T05:26:22Z")

</div>

@Napoleon We have to see the job profile to see where the time was spent, are you able to download the job profile and send it over?

> **[How To Share A Query Profile](https://www.dremio.com/resources/tutorials/share-query-profile-dremio/)**
>
> In this tutorial we’ll show you how to share a Dremio query profile. Query profiles store important metadata about queries that you run in Dremio, and can make it easier to help Dremio’s engineers debug any issues you encounter. You will require...
