Wednesday, March 7, 2012

Database & Flash Wear Management

Hello everyone,

I'm currently developping a windows .net compact framework application which is basically a local datalogger.

Since my application will log data to the database (located on compact flash card) a few times a second over long period, I wonder if SQL Server Compact Edition offers some mechanism to reduce disk access.
By example, can SQL Server compact edition wait let's say 5-10 "insert into" commands before actually write to the database located on the flash card ?.

Any ideas which could help me to reduce flash wear would be greatly appreciated !

Thanks

The storage engine introduced in SQL Mobile (v3.0) and currently in SQL CE is storage-card aware.

If you feel you need to queue up inserts to further reduce writes to the card, that would be something that

you would need to code into your logger application.

My suggestion, instead of queuing your DML commands would be to periodically perform a Verify

and if needed a Repair on the database itself. See the SqlCeEngine documentation for samples

of how to perform these checks. Repair will reorganize the database (reorder indexes, reclaim

unused page space, etc) and int he process the physical file will be rewritten on the storage card.

Regards,

Darren Shaffer

|||

Thank you very much ! It's very appreciated

Regards,

Emmanuel

No comments:

Post a Comment