# Query Model Persistence with Postgres Help

**URL:** https://community.holistics.io/t/query-model-persistence-with-postgres-help/2365
**Category:** Ask the Community
**Tags:** aml
**Created:** [January 18, 2025, 4:39pm UTC](https://community.holistics.io/t/query-model-persistence-with-postgres-help/2365 "2025-01-18T16:39:59Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![celiasjr](https://community.holistics.io/user_avatar/community.holistics.io/celiasjr/32/2047_2.png) [@celiasjr](https://community.holistics.io/u/celiasjr)
#### Post date: [January 18, 2025, 4:39pm UTC](https://community.holistics.io/t/query-model-persistence-with-postgres-help/2365/1 "2025-01-18T16:39:59Z")

</div>

We have successfully implemented persistence schedules and have views and table written to postgres. This may be a stupid question but if we are using postgres for visualizations (dashboards), does holistics automatically use those tables in queries or is there something additional we need to do. If so, how do you reference those tables in the a query?

---

<div class="post-metadata">

### Author: ![datbth](https://community.holistics.io/user_avatar/community.holistics.io/datbth/32/1414_2.png) [@datbth](https://community.holistics.io/u/datbth)
#### Post date: [January 20, 2025, 5:03am UTC](https://community.holistics.io/t/query-model-persistence-with-postgres-help/2365/2 "2025-01-20T05:03:19Z")

</div>

Hi Chuck,

Thank you for your question.

Yes, Holistics will _automatically_ use the persisted tables, if available, in place of the original model queries. You could double-check the final generated query in the **Executed SQL** panel or in **Job Logs**.

We have this [documentation](https://docs.holistics.io/docs/query-models#effects-of-model-persistence) that describes the aforementioned behavior:

 ![image](https://community.holistics.io/uploads/default/original/2X/0/0bf78233a2b694923121d9dd421905b39cf29b2f.png)

Though I guess we could make it clearer about the details you are asking for.

Let me know if you have any further questions!

---

<div class="post-metadata">

### Author: ![celiasjr](https://community.holistics.io/user_avatar/community.holistics.io/celiasjr/32/2047_2.png) [@celiasjr](https://community.holistics.io/u/celiasjr)
#### Post date: [January 20, 2025, 3:14pm UTC](https://community.holistics.io/t/query-model-persistence-with-postgres-help/2365/3 "2025-01-20T15:14:06Z")

</div>

I can see that. Do you know if there is a way to set up full persistence and incremental persistence for the same query model. The use case is would be running full persistence at night or once a week and incremental persistence at certain times between those full updates. We need this to remove deleted records.

---

<div class="post-metadata">

### Author: ![vu.duong](https://community.holistics.io/user_avatar/community.holistics.io/vu.duong/32/483_2.png) [@vu.duong](https://community.holistics.io/u/vu.duong)
#### Post date: [January 22, 2025, 3:59am UTC](https://community.holistics.io/t/query-model-persistence-with-postgres-help/2365/4 "2025-01-22T03:59:10Z")

</div>

Hi Chuck,

That’s a good idea. I can see how setting up incremental persistence in between the full persistence schedules would be useful here.

Unfortunately, at the moment there isn’t a way to set up 2 different persistence modes for the same query model. We’ve taken notes for future enhancements.

May I ask if you’re comfortable with setting up only full persistence for this case for now?

---

<div class="post-metadata">

### Author: ![vu.duong](https://community.holistics.io/user_avatar/community.holistics.io/vu.duong/32/483_2.png) [@vu.duong](https://community.holistics.io/u/vu.duong)
#### Post date: [January 23, 2025, 2:18am UTC](https://community.holistics.io/t/query-model-persistence-with-postgres-help/2365/6 "2025-01-23T02:18:25Z")

</div>

Another workaround would be to move those persistence flows into other tools like dbt.
