# Query speed, Inside Dremio vs using ODBC driver

**URL:** <https://community.dremio.com/t/query-speed-inside-dremio-vs-using-odbc-driver/2048>\
**Category:** Uncategorized\
**Created:** [October 18, 2018, 5:03pm UTC](https://community.dremio.com/t/query-speed-inside-dremio-vs-using-odbc-driver/2048 "2018-10-18T17:03:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![carol](https://avatars.discourse-cdn.com/v4/letter/c/9d8465/32.png) [@carol](https://community.dremio.com/u/carol)\
**Post date:** [October 18, 2018, 5:03pm UTC](https://community.dremio.com/t/query-speed-inside-dremio-vs-using-odbc-driver/2048/1 "2018-10-18T17:03:05Z")

</div>

I want to compare the query speed between directly query inside Dremio and query using Python thought ODBC driver.

Given the same dataset, I did multiple query and found that Query using ODBC is much slower than query inside Dremio. Why?  
What can be the factors that affect the query speed?

---

<div class="post-metadata">

**Author:** ![kelly](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/kelly/32/11_2.png) [@kelly](https://community.dremio.com/u/kelly)\
**Post date:** [October 18, 2018, 5:07pm UTC](https://community.dremio.com/t/query-speed-inside-dremio-vs-using-odbc-driver/2048/2 "2018-10-18T17:07:25Z")

</div>

Are you sure you were doing Run vs Preview for the queries you were running through Dremio?

They should be pretty close in performance, assuming your python client has sufficient network connectivity to Dremio.

You could attach two query profiles to help and we could take a look.

---

<div class="post-metadata">

**Author:** ![anthony](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/anthony/32/670_2.png) [@anthony](https://community.dremio.com/u/anthony)\
**Post date:** [October 19, 2018, 1:14am UTC](https://community.dremio.com/t/query-speed-inside-dremio-vs-using-odbc-driver/2048/3 "2018-10-19T01:14:07Z")

</div>

If you are trying to calculate total roundtrip time, external queries via ODBC/JDBC will be slightly slower because it needs to initiative a connection pool. Additionally, for external consumption, using our API is slightly faster than ODBC/JDBC as well.
