On 24 Mar 2015, at 3:43pm, Rob van der Stel <RvanderStel at benelux.tokheim.com> wrote:
> Samsung 128 GB SSD Are those Samsung 830s ? Those things are insanely fast. FlushFileBuffers() does all the hard work in disk access. Other calls may end up changing only cached information whereas FlushFileBuffers() has to go mess with the real storage device. If your device driver is properly configured then that one call can end up doing a whole lot of work and a lot of device access. Given your times ... > --- SQLite 1000 x append in new database *) > System 1: 1000 - 1100 msec > System 2: 10000 - 11000 msec > --- Binary file 1000 x {append + FlushFileBuffers} *) > System 1: 220 - 230 msec > System 2: 2600 - 2700 msec 1000 append transactions in SQLite can amount to 6000 simple file operations (assuming a normal journaling mode and no dodgy PRAGMAs). The difference in the figures you show here doesn't look too out of place: in both cases SQLite is about 4 times binary. Looking at the above numbers I am wondering whether the System 1 device driver and OS was actually giving you true ACID operations, with write-in-order and write barriers enforced correctly. System 1 figures do seem to be very low, whereas the System 2 figures seem to be about what I'd expect for a fast SSD. Simon.