# \`using\` on demand, is it possible?

**URL:** https://discourse.julialang.org/t/using-on-demand-is-it-possible/19696
**Category:** General Usage
**Created:** [January 16, 2019, 1:23pm UTC](https://discourse.julialang.org/t/using-on-demand-is-it-possible/19696 "2019-01-16T13:23:49Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Ronis\_BR](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ronis_br/32/50999_2.png) [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)
#### Post date: [January 16, 2019, 1:23pm UTC](https://discourse.julialang.org/t/using-on-demand-is-it-possible/19696/1 "2019-01-16T13:23:49Z")

</div>

Hi guys!

I have a package that needs to use `ODBC.jl` for some tasks. However, the compilation time and import time is huge. Hence, I am wondering: is there a way to import packages “on demand”? For example, I just need this package when the user calls the function `connect_db`.

---

<div class="post-metadata">

### Author: ![Gnimuc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gnimuc/32/2194_2.png) [@Gnimuc](https://discourse.julialang.org/u/Gnimuc)
#### Post date: [January 16, 2019, 2:04pm UTC](https://discourse.julialang.org/t/using-on-demand-is-it-possible/19696/2 "2019-01-16T14:04:39Z")

</div>

Here is the implementation of `check_import` function in FileIO.jl that provides a similar feature:

> <https://github.com/JuliaIO/FileIO.jl/blob/a676a5c51fbc0181ebe46348c63cc6de9e09bcae/src/loadsave.jl#L6-L32>
