John Gunnarsson wrote: > Actually the embedded device is a small self containing linux server, see > www.acmesystems.it > The device has an USB harddrive attached to it and the drive is shared via > samba, which is way i > add or remove mp3 songs. > > The device would serve as my home server and i would access it via BT > either > from my palm or a phone, > so there will never be a pc connected to it other when i transfer new songs > to it. > > The synch process would be manually started by the user (me) > > //John
Running multiple SQL queries is NOT in your best interest (and an index is going to bloat the DB to high heaven - you're on an embedded system - don't shoot yourself in the foot). Run ONE SQL query that selects all the data. Then retrieve the data one row at a time and query the hard drive instead. Here's why: The hard drive is going to scan for the first file but the file system in the OS is going to cache results of the entries in the directory. So, you'll have a huge performance boost because most of the hard drive queries are already going to be in memory and, well, the OS is optimized for that sort of thing. Although, I'm not sure how USB 1.1 is going to perform. I still think it will be faster than multiple SQL queries because data is going to get cached by the OS and reading is generally significantly faster than writing when using USB (unless caching is turned off). BTW, very nifty piece of hardware. Good luck with that project! (We'll be here if you need help with the code). -- Thomas Hruska CubicleSoft President Ph: 517-803-4197 *NEW* VerifyMyPC 2.1 Change tracking and management tool. Reduce tech. support times from 2 hours to 5 minutes. Free for personal use, $10 otherwise. http://www.CubicleSoft.com/VerifyMyPC/