November 26, 2024, 06:05:28 PM

SDCARD or SPIFF for BBDD

Started by yurka, March 08, 2024, 11:12:45 AM

Previous topic - Next topic

yurka

Hoal to all! 8)

I have the need to use BBDD (database) to be able to work in OFFLINE.
Information is very poor and simple {key,value}.

Does anyone know where is better to put in SDCARD, SPIFFS Filesystem or other place.

Thanks

LubOlimex

You can store in the flash memory or in the sd card. I believe SPIFFS is not the best. Best idea is to search online for  this string - "storage esp32" you will find many useful forum threads and options and experience.
Technical support and documentation manager at Olimex

yurka

Hello @LubOlimex thank you very much for your quick answer,
as you can see the need I have is OFFLINE, without internet minimum 30-200 records +/- 13bytes/register

I have thought about creating a txt file and making "appened". then once it reaches a measurement, it will be overwritten in SPIFFS.

But I would like to hear opinions and experiences of people :)

KeviNH

SPIFFS is deprecated and may be retired soon, and for a number of reasons is not recommended for storing a large number of very small files.

If you need to store short values, consider storing the data in NVS (aka "Preferences").  It is designed to store many small values in flash.

For a fully offline device, could pre-fill the cache via the NVS Partition Generator Utility.

yurka

hmmm, storing directly in the FLASH, I will look into it, I mean just storing 50 - 200 12byte records. That's enough.

Thank you and very kind!



Quote from: KeviNH on March 10, 2024, 04:35:10 AMSPIFFS is deprecated and may be retired soon, and for a number of reasons is not recommended for storing a large number of very small files.

If you need to store short values, consider storing the data in NVS (aka "Preferences").  It is designed to store many small values in flash.

For a fully offline device, could pre-fill the cache via the NVS Partition Generator Utility.