# Send a query to a different version of the DB

**URL:** <https://community.stardog.com/t/send-a-query-to-a-different-version-of-the-db/707>\
**Category:** Support\
**Created:** [November 28, 2017, 12:57am UTC](https://community.stardog.com/t/send-a-query-to-a-different-version-of-the-db/707 "2017-11-28T00:57:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yoosung](https://avatars.discourse-cdn.com/v4/letter/y/a3d4f5/32.png) [@Yoosung](https://community.stardog.com/u/Yoosung)\
**Post date:** [November 28, 2017, 12:57am UTC](https://community.stardog.com/t/send-a-query-to-a-different-version-of-the-db/707/1 "2017-11-28T00:57:18Z")

</div>

Hi

I use several versions of the database using version tags.  
For example, the version tag that created the database is V0.  
The database version tags created in order are V1, V2, and V3.  
The current version tag is using V3.  
At this time, I want to send the queries to V1, V2 and V3 respectively and see the results.  
Is there a way to do this?

There is a way to use the **vcs revert** function, but this is not the method I want.  
I am looking for a way to use only queries.

I have seen version history and database lookups if I use **SERVICE** here ([Home | Stardog Documentation Latest](http://www.stardog.com/docs/#_querying_the_revision_history)).

I want to know if it is possible. I want to get support from the community in this part. 😄

---

<div class="post-metadata">

**Author:** ![pavel](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/pavel/32/18_2.png) [@pavel](https://community.stardog.com/u/pavel)\
**Post date:** [November 28, 2017, 11:05am UTC](https://community.stardog.com/t/send-a-query-to-a-different-version-of-the-db/707/2 "2017-11-28T11:05:59Z")

</div>

Hi Yoosung,

No, there’s currently no way to query a past state of the data. This is something we’re considering at the moment but there’s no planned release date.

Best,  
Pavel

---

<div class="post-metadata">

**Author:** ![zachary.whitley](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/zachary.whitley/32/94_2.png) [@zachary.whitley](https://community.stardog.com/u/zachary.whitley)\
**Post date:** [November 28, 2017, 2:22pm UTC](https://community.stardog.com/t/send-a-query-to-a-different-version-of-the-db/707/3 "2017-11-28T14:22:50Z")

</div>

I think your only option is to take snapshots of your database at V1, V2, and V3. You can use `vcs revert` to get you back to your revision and then use `db copy` to get a snapshot of your database at that revision and then repeat for each revision. You’d only be using `vcs revert` to get the copies. You can then query your versions using service queries or you could possibly dump your versioned databases and load them into a single db in a named graph to avoid the service queries if you’re not using quads. If you really want to get crazy you can always do backups instead of copies and run three separate installations of Stardog running on separate ports or on separate machines. I’m not sure exactly what you’re looking to do so I’m just throwing ideas out there.

This might not be an option depending on your resources available and the number of triples.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [December 12, 2017, 2:23pm UTC](https://community.stardog.com/t/send-a-query-to-a-different-version-of-the-db/707/4 "2017-12-12T14:23:01Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
