# Live Coding: Discovering DuckDB on Thursday, June 20 at 10 AM!

**URL:** <https://community.gladysassistant.com/t/live-coding-decouverte-de-duckdb-le-jeudi-20-juin-a-10h/8979>\
**Category:** Actualités\
**Created:** [June 19, 2024, 4:24pm UTC](https://community.gladysassistant.com/t/live-coding-decouverte-de-duckdb-le-jeudi-20-juin-a-10h/8979 "2024-06-19T16:24:50Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [August 5, 2024, 3:57pm UTC](https://community.gladysassistant.com/t/live-coding-decouverte-de-duckdb-le-jeudi-20-juin-a-10h/8979/41 "2024-08-05T15:57:18Z")

</div>

Hi everyone!

I’ll be testing this version in the coming days on my production (PROD) at home.

If the tests are successful, I’d like to know whether a deployment during the last week of August is feasible or if many of you will still be on vacation?

As this is a major update, I want to be careful and avoid causing issues for users on vacation who won’t be home to monitor the update 🙂

**Quick poll:**

_Poll ([view on site](https://community.gladysassistant.com/t/live-coding-decouverte-de-duckdb-le-jeudi-20-juin-a-10h/8979/41))_

Thanks everyone for your replies!

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [August 6, 2024, 7:39pm UTC](https://community.gladysassistant.com/t/live-coding-decouverte-de-duckdb-le-jeudi-20-juin-a-10h/8979/42 "2024-08-06T19:39:04Z")

</div>

I just installed the DuckDB test image on my prod 🥳

My prod has been running since February with more than thirty Zigbee devices + one camera.

I currently have 996k sensor values in the database:

 ![Screenshot 2024-08-06 at 21.16.44](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/f/2/f2f4d892244b863f37ade88eef10030e0fdd099b.png)

The migration took 1 minute 20 seconds on my setup:

```auto
2024-08-06T21:10:19 DuckDB: Migrating data from SQLite
...
2024-08-06T21:11:47 DuckDB: Finished migrating DuckDB.

```

(As a reminder, the migration is non-blocking so during that time my instance was running without issue)

Before / after:

**SQLite database:** 905 MB  
**DuckDB database:** 18 MB

That’s impressive!

What’s even more impressive is the responsiveness of the charts.

I can easily display months of temperature history, it’s very smooth and the values look much cleaner because 2 issues are now solved by this tech:

- No weird rounding outside the 24h view on the charts
- There are only "live" data anymore, so the last hour’s data is visible on all charts!

**Cleaning up old values**

I clicked on "purge SQLite states":

 ![Screenshot 2024-08-06 at 21.28.40](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/5/a/5a2dcb56f443554f2271f0b381b2c0bedc829392.png)

The purge took 12 minutes on my setup.

**Database cleanup**

I ran a database cleanup, which was almost instantaneous for me.

Then I restarted Gladys.

**The result**

```auto
1008K Aug 6 19:34 gladys-production.db
32K Aug 6 19:34 gladys-production.db-shm
278K Aug 6 19:34 gladys-production.db-wal
3.1M Aug 6 19:11 gladys-production.duckdb
15M Aug 6 19:34 gladys-production.duckdb.wal

```

**Total = 19 MB**

With a previous size of 905 MB, that’s -97.9% 🤩

I’ll keep monitoring my instance over the next few days and see how it goes 🙂

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [August 6, 2024, 8:52pm UTC](https://community.gladysassistant.com/t/live-coding-decouverte-de-duckdb-le-jeudi-20-juin-a-10h/8979/43 "2024-08-06T20:52:55Z")

</div>

That’s so great, well done for all that work!!

---

<div class="post-metadata">

**Author:** ![GBoulvin](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/gboulvin/32/10006_2.png) [@GBoulvin](https://community.gladysassistant.com/u/GBoulvin)\
**Post date:** [August 7, 2024, 10:04am UTC](https://community.gladysassistant.com/t/live-coding-decouverte-de-duckdb-le-jeudi-20-juin-a-10h/8979/44 "2024-08-07T10:04:28Z")

</div>

Uh…  
Is that possible?! 😇

 ![Screenshot_20240807_115601_com.sonelli.juicessh_edit_185379455289942](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/8/0/80421ccda0127b0ab205ef55c6fb8f5f60df316b.jpeg)

Migration start 9:53  
End 11:47

Edit: However, I’m not sure this is very effective:

 ![Screenshot_20240807_123046_com.android.chrome](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/b/1/b1deefccc81a7b1049d894df32c759d086adf1d9.jpeg)  
I don’t know how that’s possible. I think I refreshed the page and the request was resent…  
Otherwise, it’s moving. Slowly but it’s moving 4% after an hour) !

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [August 7, 2024, 5:42pm UTC](https://community.gladysassistant.com/t/live-coding-decouverte-de-duckdb-le-jeudi-20-juin-a-10h/8979/45 "2024-08-07T17:42:10Z")

</div>

> [@GBoulvin](#):
>
> Is that possible?! 😇

Unbelievable! 😃

> [@GBoulvin](#):
>
> Edit: However, not sure this is super effective:

It’s

---

<div class="post-metadata">

**Author:** ![GBoulvin](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/gboulvin/32/10006_2.png) [@GBoulvin](https://community.gladysassistant.com/u/GBoulvin)\
**Post date:** [August 7, 2024, 8:25pm UTC](https://community.gladysassistant.com/t/live-coding-decouverte-de-duckdb-le-jeudi-20-juin-a-10h/8979/46 "2024-08-07T20:25:51Z")

</div>

I was talking about having two processes running in parallel…  
After 10:00, I’m at 20% 🤪  
12:00 – 57%.  
I’ll do a full

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [August 8, 2024, 5:42pm UTC](https://community.gladysassistant.com/t/live-coding-decouverte-de-duckdb-le-jeudi-20-juin-a-10h/8979/47 "2024-08-08T17:42:48Z")

</div>

When I see the difference in Gladys Plus backups before/after 😅

 ![Screenshot 2024-08-08 at 19.41.49](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/3/1/318ae1460a4f57aa61757a892216fad71d1abb82.png)

(the backups are compressed)

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [August 8, 2024, 6:01pm UTC](https://community.gladysassistant.com/t/live-coding-decouverte-de-duckdb-le-jeudi-20-juin-a-10h/8979/48 "2024-08-08T18:01:22Z")

</div>

There will be plenty of space on your servers like this for backups of new Gladys Plus users👌

---

<div class="post-metadata">

**Author:** ![GBoulvin](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/gboulvin/32/10006_2.png) [@GBoulvin](https://community.gladysassistant.com/u/GBoulvin)\
**Post date:** [August 8, 2024, 9:15pm UTC](https://community.gladysassistant.com/t/live-coding-decouverte-de-duckdb-le-jeudi-20-juin-a-10h/8979/49 "2024-08-08T21:15:32Z")

</div>

Here’s a more detailed look at how the migration went.  
Overall, no problem.  
First of all, I was surprised that the migration started as soon as the container was started. In itself, that doesn’t cause a problem.

 ![Screenshot_20240807_095354_com.android.chrome_edit_225116070249503](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/3/9/3964a0375cb4a6948eda66ff3b3aa7d5ee673f3b.jpeg)

However, the migration immediately started at 23%.  
In the tasks, you can clearly see the progress.

 ![Screenshot_20240807_095725_com.android.chrome_edit_225246377520837](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/c/a/ca5c868c611bd97b85e308994063d440817947fb.jpeg)  
It’s slow, but it’s moving forward.  
Meanwhile, Gladys is slowed but not unusable.  
 ![Screenshot_20240807_095843_com.android.chrome_edit_225360959523945](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/d/0/d03acc8f53ffd0f8de3db803aecac3460f9104ac.jpeg)

1GB of RAM used.

 ![Screenshot_20240807_113537_com.sonelli.juicessh_edit_225424235948414](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/3/7/377a6608aadbc676e7fc50bec006fdfee3effc08.jpeg)  
The result, crazy, a DB of 65MB instead of 11.4GB!  
 ![Screenshot_20240807_115408_com.android.chrome_edit_225632449894216](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/d/c/dc5de68c30dc1ba4dddf98eaa11918ef16ac6a8f.jpeg)  
 ![Screenshot_20240807_115601_com.sonelli.juicessh_edit_185379455289942](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/8/0/80421ccda0127b0ab205ef55c6fb8f5f60df316b.jpeg)  
However, the next step, the purge… was painful!  
Several very long hours during which Gladys was, on my setup, close to paralysis…  
This morning, I see that  
 ![Screenshot_20240808_100157_com.android.chrome_edit_225921829029068](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/b/f/bf7a2a7dfc9b4d9ff33fd29b42199b485b4d273b.jpeg)  
And it doesn’t move anymore.  
Then I receive a restart notification for Gladys (maybe watchtower?). And in the tasks:  
 ![Screenshot_20240808_173529_com.android.chrome](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/5/8/58488908a4cbfb09e2d4d7d09e59e6c67f39acab.jpeg)  
(There’s a typo: ‹&nbsp;a échoué&nbsp;› would be more correct)  
However:  
 ![Screenshot_20240808_100208_com.android.chrome_edit_225959322198854](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/8/7/879a3b7c24e65212d71463ce1b98cb103f77c5f4.jpeg)  
So I start a database cleanup which, as expected, blocks Gladys for about an hour.  
But after checking, I find that the old DB is not empty:  
 ![Screenshot_20240808_153712_com.sonelli.juicessh_edit_226914029170062](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/2/0/2033766aee7e3c1052e26738823cf46ffbb6dac9.jpeg)  
So I restarted the purge and DB cleanup steps and there you go (oh yes, and a manual container restart to clear the db-wal).  
 ![Screenshot_20240808_222223_com.sonelli.juicessh_edit_227137234201799](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/3/3/337f547be16346b1e06c6914ee32c26215bc45fa.jpeg)  
And since we were talking about backups, a screenshot of mine:  
 ![Screenshot_20240808_222519_com.android.chrome](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/d/b/db6d85b7c6f58425e4afc408c9d8cbe74ccf4ac8.jpeg)  
Obviously, it’s very small, if not uncompressed (is that still necessary?)  
Total time… Nearly 30h…  
We agree that the purge and cleanup steps are not essential but they allowed me to solve my storage problem 😇

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [August 9, 2024, 7:54am UTC](https://community.gladysassistant.com/t/live-coding-decouverte-de-duckdb-le-jeudi-20-juin-a-10h/8979/50 "2024-08-09T07:54:56Z")

</div>

> [@GBoulvin](#):
>
> First of all, I was surprised that the migration started as soon as the container was started. In itself, that doesn’t pose a problem.

Yes, the migration is mandatory, the old code for SQLite is no longer present, and as long as the migration hasn’t finished, you have an incomplete Gladys operation (the graphs will be empty otherwise).

> [@GBoulvin](#):
>
> However, the migration immediately started at 23%.

The migration is not linear; the percentage represents the percentage of features migrated. Some features have many states, others fewer.

Trying to make an even more precise progress bar would be counterproductive — it would take time to calculate how many states each feature has, and that would slow the migration.

> [@GBoulvin](#):
>
> Several very long hours during which Gladys was, at my place, close to paralysis…  
> This morning, I see that

Yes, starting the task twice must have doubled the load 😅 I don’t know how you did that ^^ Same for the percentage that got stuck — the two tasks each did the work and so halfway the job must have been finished, and they couldn’t progress further. In itself, it’s not very serious ^^ You did well to restart the task after the reboot; it finished the job.

> [@GBoulvin](#):
>
> Then I receive a restart notification from Gladys (maybe Watchtower?). And in the tasks:

Yes, I deployed 2 updates to the DuckDB image, Wednesday evening and Thursday evening, to fix various issues I had noticed on my prod. Watchtower must have run afterwards.

> [@GBoulvin](#):
>
> (There is a typo: ‹&nbsp;a échoué&nbsp;› would be more correct)

It’s an old translation, not new to this release, but I’ll correct it ^^

> [@GBoulvin](#):
>
> Obviously, it’s very little, if not uncompressed (is it still necessary?)

Now, the backup file exported by DuckDB is in .parquet format, and this format is heavier than DuckDB’s storage format which is very compressed. So there will be less difference between the Gladys Plus backup and the local files, even the file on Gladys Plus will be a bit heavier. But when you look at the file sizes… 😃

> [@GBoulvin](#):
>
> We agree that the purge and cleanup steps are not essential but they helped solve my storage problem 😇

Thanks for your very detailed feedback!

Despite the little hiccup of the purge task being launched twice, the migration is clearly a success for you.

With 13 million states, 11 GB of SQLite DB, and all that on a setup that’s not among the most powerful (Raspberry Pi 4 + SSD over USB I think), it’s really neat!

If you ever want to keep this setup as PROD (so you don’t have to do the migration a second time), you can. You will just need to switch back to the image tagged v4 as soon as I publish that to PROD (end of the month).

A big thank you for testing 🙏

---

<div class="post-metadata">

**Author:** ![GBoulvin](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/gboulvin/32/10006_2.png) [@GBoulvin](https://community.gladysassistant.com/u/GBoulvin)\
**Post date:** [August 9, 2024, 10:46am UTC](https://community.gladysassistant.com/t/live-coding-decouverte-de-duckdb-le-jeudi-20-juin-a-10h/8979/51 "2024-08-09T10:46:36Z")

</div>

> [@pierre-gilles](#):
>
> Starting the task twice must have doubled the load 😅 I don’t know how you did it

Me neither, but when restarting the task after Gladys rebooted, it happened again — duplicated again, and in both cases about fifteen minutes apart. The second time, I’m sure I didn’t click again or refresh this page…

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [August 9, 2024, 11:23am UTC](https://community.gladysassistant.com/t/live-coding-decouverte-de-duckdb-le-jeudi-20-juin-a-10h/8979/52 "2024-08-09T11:23:10Z")

</div>

OK, I’ll add code to prevent duplicate launches.

---

<div class="post-metadata">

**Author:** ![Terdious](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/terdious/32/6316_2.png) [@Terdious](https://community.gladysassistant.com/u/Terdious)\
**Post date:** [August 15, 2024, 8:30am UTC](https://community.gladysassistant.com/t/live-coding-decouverte-de-duckdb-le-jeudi-20-juin-a-10h/8979/53 "2024-08-15T08:30:04Z")

</div>

Hello !!

Back from vacation, I’m jumping in as well:

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/a/9/a9f199c6c22d608668608bb452ae9c12f1ba4f3d.png)  
 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/7/9/79768b885162d0f8a7c732af851444a45734295e.png)

At the image launch: 10:35 - Quite a significant slowdown but Gladys still available (as with @GBoulvin)

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/6/6/6610976d367b68042e0557ed9c1202c3cd0fafa6.jpeg)

Progress preview unavailable on the system page during the first 5 minutes:

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/f/d/fd8b631bf030d2d0e75226e44ba966cb965d5a08.png)  
Then:  
 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/f/c/fc487438566ee9f7fe96ff19e234c5f32dbbfc88.png)

EDIT1: 9% after 10 minutes, not bad ^^

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [August 15, 2024, 9:04am UTC](https://community.gladysassistant.com/t/live-coding-decouverte-de-duckdb-le-jeudi-20-juin-a-10h/8979/54 "2024-08-15T09:04:23Z")

</div>

So cool! Can’t wait to see how it looks at your place 😁

---

<div class="post-metadata">

**Author:** ![Terdious](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/terdious/32/6316_2.png) [@Terdious](https://community.gladysassistant.com/u/Terdious)\
**Post date:** [August 15, 2024, 9:52am UTC](https://community.gladysassistant.com/t/live-coding-decouverte-de-duckdb-le-jeudi-20-juin-a-10h/8979/55 "2024-08-15T09:52:53Z")

</div>

After 1 hour it seems to be struggling, page refreshes are getting slower and slower (about 1 minute or so) and the % isn’t moving forward (stuck at 31% for 15 minutes ^^) but the states are increasing fine ^^ So no worries ^^

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/2/5/257f7642902e9abcdb81c58e078f02cf08c0814c.png)  
On the resource side, it doesn’t change much:  
 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/a/4/a466b7144f05d0d037bc335fe33af8d839994e64.png)

EDIT: After 2h10 :

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/7/e/7e38fd4466db191eaae6be2b729b8b6dd0ba1cdd.png)  
 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/a/e/ae431e752b474de9fd829eca273fb244144a3279.png)

---

<div class="post-metadata">

**Author:** ![Terdious](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/terdious/32/6316_2.png) [@Terdious](https://community.gladysassistant.com/u/Terdious)\
**Post date:** [August 15, 2024, 12:54pm UTC](https://community.gladysassistant.com/t/live-coding-decouverte-de-duckdb-le-jeudi-20-juin-a-10h/8979/56 "2024-08-15T12:54:54Z")

</div>

Migration completed in 3h30 (approximately ^^) :

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/a/b/abd0ecc5c702f366135a8fb2ce9764522e5ed10c.png) ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/c/3/c3fb93e6d55fffe7c230bae3fd5797d27ef0f66e.png)  
 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/e/b/eb0aaaccba0ae8f97cdb3911c2f6dcb8d0672a7b.png)

Result :

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/b/a/bacf021cea430f38c9807b6646361b50e4651ea7.png)

As already said above and agreed by everyone: Impressive ^^

Well… now the part I’ve been dreading for a while, the purge!^^

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/9/e/9e0f726240daf499dc904460adba8eb2b8f89ca5.png)

For me, Gladys has been unavailable for 5 minutes (start of the purge)

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/f/5/f5727809d36d2ebaf8bc6f5556231f382a7bfbce.png)

EDIT: 400k states purged in 15 minutes … we’ll let it keep working ^^ because if we take a flat reasoning: 26,700 states per minute =\> 3,000 minutes =\> 50h ^^

Gladys is available again.  
1% after 20 minutes

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [August 15, 2024, 1:55pm UTC](https://community.gladysassistant.com/t/live-coding-decouverte-de-duckdb-le-jeudi-20-juin-a-10h/8979/57 "2024-08-15T13:55:10Z")

</div>

> [@Terdious](#):
>
> Migration completed in 3h30 (approximately ^^):

For 80 million states that’s clean! 😃

Can’t wait to see the final result once the DB is

---

<div class="post-metadata">

**Author:** ![Terdious](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/terdious/32/6316_2.png) [@Terdious](https://community.gladysassistant.com/u/Terdious)\
**Post date:** [August 15, 2024, 5:52pm UTC](https://community.gladysassistant.com/t/live-coding-decouverte-de-duckdb-le-jeudi-20-juin-a-10h/8979/58 "2024-08-15T17:52:18Z")

</div>

> [@Terdious](#):
>
> EDIT : 400k states purged in 15 minutes … we’ll let it run ^^ because if we do a straightforward calculation: 26 700 states per minute =\> 3.000 minutes =\> 50h ^^

We shouldn’t be far from that for

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [August 15, 2024, 6:13pm UTC](https://community.gladysassistant.com/t/live-coding-decouverte-de-duckdb-le-jeudi-20-juin-a-10h/8979/59 "2024-08-15T18:13:43Z")

</div>

I’m not surprised; the purge is being done very gradually so the instance can continue to operate (continue to receive sensor values, run scenes)

Everything that touches the SQLite DB remains slowed down, of course, but it’s not entirely blocked either!

Keep us posted

---

<div class="post-metadata">

**Author:** ![Terdious](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/terdious/32/6316_2.png) [@Terdious](https://community.gladysassistant.com/u/Terdious)\
**Post date:** [August 16, 2024, 11:44am UTC](https://community.gladysassistant.com/t/live-coding-decouverte-de-duckdb-le-jeudi-20-juin-a-10h/8979/60 "2024-08-16T11:44:03Z")

</div>

Small question @pierre-gilles,  
Is it normal to no longer have a graph/history after migration and during the purge? Because for my part I currently have no data except the last value.

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/b/7/b7bfb5e849a8d32447657123bab3158d879d91e4.png)

So the purge would therefore be mandatory before using the DuckDB database or was it supposed to take over after the migration?

Since the message no longer appears at the top of the page once the migration is finished and there is no indication to restart, I have doubts ^^

EDIT: Well, I have my answer 😅 once the SQLite states dropped to 0 everything came back ^^ So purge mandatory before using DuckDB. However, the purge in the tasks is still in progress (69%):

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/4/8/481d1017906d72dd235f00e72ba924aafd5140ef.png)  
 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/a/1/a1ce1760378a25e8c7eb20d4b311f12a69e9f12c.png)

I shouldn’t touch anything for now (no DB cleanup)?

Result of deleting the SQLite states: 23h for 80 million states (2024-08-15 12:55:28.297 +00:00 =\> 2024-08-16 11:56:34.779 +00:00) … Waiting for the end of the final purge.

[Previous page](https://community.gladysassistant.com/t/live-coding-decouverte-de-duckdb-le-jeudi-20-juin-a-10h/8979.md?page=2)

[Next page](https://community.gladysassistant.com/t/live-coding-decouverte-de-duckdb-le-jeudi-20-juin-a-10h/8979.md?page=4)
