Hmmm...I would've thought copy would cache the file...learned something new (again)....but at least you've identified the problem as caching vs disk i/o. #1 Are you using the same database file on both Windows and Linux or are you creating it independently on each? I'm wondering if your Windows system is fragmented (much more likely than your Linux system is to frag). How full is the disk that your database is on and have you defragged that disk? #2 How long does your fread program take to run? If must be much less then 40 seconds I would imagine. #3 How long does "select * from mytable" take when it's the first thing you run on both Linux and Windows? #4 Have you tried changing your caching to "System Cache" instead of "Programs" jsut to see what happens? People with gigabyte-sized+ files are frequently out of luck if they have to actually query the whole database (this is where indexes can come in real handy to minimize how much reading goes on). But if you walk through all the data caching the whole database isn't an option if it's bigger than available memory. Michael D. Black Senior Scientist Advanced Analytics Directorate Northrop Grumman Information Systems
________________________________ From: sqlite-users-boun...@sqlite.org on behalf of Samet YASLAN Sent: Fri 7/23/2010 3:05 AM To: sqlite-users@sqlite.org Subject: EXTERNAL:Re: [sqlite] Very Slow DB Access After Reboot on Windows I have tried changing the extension and also "copy my.db nul:". The result does not change a bit. Still 40sec. I also tried reading the file with fread before openning db connection like; FILE* fp = fopen(fileName.c_str(), "rb"); if ( fp ) { char pBuffer[1024*32]; while ( fread(pBuffer, 1024, 32, fp) > 0 ) { } fclose(fp); } This is very helpful and really decreases the total read performance including this operation. But if the file size is too big than this may lead to some problems again. Anyway there must be some users reaching gigabytes of DB size and I am not sure they are waiting one hour after restarting their PCs. There must be a way to solve this problem. As I said before Linux is just fine. I wish to see Linux on every PC one day. *Samet YASLAN* On 22.07.2010 22:51, Kees Nuyt wrote: > On Thu, 22 Jul 2010 10:44:50 -0500, "Black, Michael (IS)" > <michael.bla...@ngc.com> wrote: > > >> Wrong....read the docs...if copy didn't do binary by default there would so >> many screwed up computers in the world.... >> >> >> http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/copy.mspx?mfr=true >> >> Using /b >> > I stand corrected, thanks for the research. > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users