Re: [sqlite] Windows (slow) vs. iOS/OSX (fast) Performance

2012-11-30 Thread David de Regt
For the partition in question, the starting offset is 156,860,678,144 which divides evenly into 128k (131072). So, doesn't look like the issue. Also divides nicely into several further powers of 2 if the block size were smaller. From:

Re: [sqlite] Windows (slow) vs. iOS/OSX (fast) Performance

2012-11-30 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 30/11/12 13:31, David de Regt wrote: > Only possible agent is MSE, MSE is the best behaved. Norton and similar are especially bad. > ... and process monitor doesn't show it eating IO Sadly that rules out easy fixes :-) > I tried changing block

Re: [sqlite] Windows (slow) vs. iOS/OSX (fast) Performance

2012-11-30 Thread David de Regt
Only possible agent is MSE, and process monitor doesn't show it eating IO, likely since it's not a watched extension. I saw the article about the extensions a while ago, so we decided to use .s3db for our database extension. I tried changing block size to the native block size and it only sped

Re: [sqlite] Windows (slow) vs. iOS/OSX (fast) Performance

2012-11-30 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 30/11/12 09:41, David de Regt wrote: > Is there something ridiculous about the windows file system performance > that hoses sqlite's open/read/write/close transaction cycle? There are multiple possible confounding factors. One is that you could

Re: [sqlite] Windows (slow) vs. iOS/OSX (fast) Performance

2012-11-30 Thread David de Regt
Windows 7/64 SP1. Latest OSX (10.8). The performance differential is definitely IO-related. When I switch to wrapping everything in a transaction, the differential drops to ~1.5x (windows = 110ms, ios = 70ms, on a giant set of inserts). So, it's something to do with the IO subsystem.

Re: [sqlite] Windows (slow) vs. iOS/OSX (fast) Performance

2012-11-30 Thread Teg
Hello David, In /control panel/system/device manager/disk drives/properties/Policies you can disable the windows "write cache buffer flush" to the drive. I wonder if this would make a difference? My machine is on a UPS so, I always disable it. I tend to disable it on laptops too. I know it's

Re: [sqlite] Windows (slow) vs. iOS/OSX (fast) Performance

2012-11-30 Thread Simon Slavin
On 30 Nov 2012, at 5:41pm, David de Regt wrote: > Basic query set: > CREATE TABLE test (col1 int, col2 text); > [loop 500 times]: INSERT INTO TEST (col1,col2) VALUES (4,'test4') I read with interest the figures you produced so far, though I have no explanation. Can I ask

Re: [sqlite] Windows (slow) vs. iOS/OSX (fast) Performance

2012-11-30 Thread Black, Michael (IS)
If you'd care to share your code I can test it on XP-64 and Windows 7 to see if I can duplicate your problem. Michael D. Black Senior Scientist Advanced Analytics Directorate Advanced GEOINT Solutions Operating Unit Northrop Grumman Information Systems

Re: [sqlite] Windows (slow) vs. iOS/OSX (fast) Performance

2012-11-30 Thread David de Regt
Nope, I ran the tests both in Parallels and rebooting directly into boot camp (basically native windows), and had essentially identical performance (+/- 2%, within noise level differences). It also echoes the performance difference I'd been seeing on the database side just watching the real

Re: [sqlite] Windows (slow) vs. iOS/OSX (fast) Performance

2012-11-30 Thread Black, Michael (IS)
Could this be your problem? http://mattgadient.com/2011/02/18/mac-os-x-slow-for-10-15-minutes-after-boot-the-fix/ Michael D. Black Senior Scientist Advanced Analytics Directorate Advanced GEOINT Solutions Operating Unit Northrop Grumman Information Systems

Re: [sqlite] Windows (slow) vs. iOS/OSX (fast) Performance

2012-11-30 Thread Alex Bowden
It's not your problem. If the idiot user wants a slow machine, that's his choice. It certainly isn't your job to turn off sync in order to hide how slow Windows is. On 30 Nov 2012, at 17:41, David de Regt wrote: > Hey all. I've been struggling with a basic perf issue

[sqlite] Windows (slow) vs. iOS/OSX (fast) Performance

2012-11-30 Thread David de Regt
Hey all. I've been struggling with a basic perf issue running the same code on Windows vs. iOS and OSX. Basic query set: CREATE TABLE test (col1 int, col2 text); [loop 500 times]: INSERT INTO TEST (col1,col2) VALUES (4,'test4') I'm coding this using the default C amalgamation release and using

Re: [sqlite] Database design preferences

2012-11-30 Thread Duquette, William H (318K)
On 11/30/12 8:34 AM, "Simon Slavin" wrote: > >On 30 Nov 2012, at 3:50pm, Staffan Tylen wrote: > >> I'm looking for both administrative and technical advice on the pros and >> cons of either creating one single database table with many columns or >>

Re: [sqlite] Database design preferences

2012-11-30 Thread Simon Slavin
On 30 Nov 2012, at 3:50pm, Staffan Tylen wrote: > I'm looking for both administrative and technical advice on the pros and > cons of either creating one single database table with many columns or > creating multiple tables with fewer but related columns to be JOINed

Re: [sqlite] Database design preferences

2012-11-30 Thread Black, Michael (IS)
One of my considerations would be whether or not the fields are 1-to-1 to the user or are non-related. In your list for example favorite politician is something non-related to the user and you might want to implement either as a search function or a pulldown list or a tabulated page. So

[sqlite] Database design preferences

2012-11-30 Thread Staffan Tylen
I'm looking for both administrative and technical advice on the pros and cons of either creating one single database table with many columns or creating multiple tables with fewer but related columns to be JOINed when needed. Assume that the data is all related 1-to-1, like name, home address,

Re: [sqlite] Foreign keys needing an index

2012-11-30 Thread Igor Tandetnik
Simon Slavin wrote: > Need someone more familiar with the design philosophy and source code than I > am (which is not at all). > > > > Says you need an index for anything which acts as a parent. I can understand > why

Re: [sqlite] Foreign keys needing an index

2012-11-30 Thread Jay A. Kreibich
On Fri, Nov 30, 2012 at 02:57:30PM +, Simon Slavin scratched on the wall: > Need someone more familiar with the design philosophy and source code than I > am (which is not at all). > > > > Says you need an index for anything which acts as

[sqlite] Foreign keys needing an index

2012-11-30 Thread Simon Slavin
Need someone more familiar with the design philosophy and source code than I am (which is not at all). Says you need an index for anything which acts as a parent. I can understand why under normal circumstances (large table) this would be

Re: [sqlite] Audit trail question...

2012-11-30 Thread Igor Tandetnik
André Wetzel wrote: > I'm quite new to SQLite. I wanted to add an audit trail by using the CREATE > TRIGGER statement. My problem is now that I want to > log the changes together with the current user and timestamp. The current > user is a variable or a

[sqlite] FW: How to add SQLite SDK/dll to WP 8 project

2012-11-30 Thread suresh P
Hi, Could you please help me to fix my issue. I am trying to do my first Windows phone 8 app with SQLite. I installed the extension "SQLite for Windows phone". Then I tried to add its SDK references to the project. but I didn't find it (see pic2 attached). I restarted Visual Studio 2012 and

[sqlite] Audit trail question...

2012-11-30 Thread André Wetzel
Hi all, I'm quite new to SQLite. I wanted to add an audit trail by using the CREATE TRIGGER statement. My problem is now that I want to log the changes together with the current user and timestamp. The current user is a variable or a index to the user table. Because the TRIGGER statement is a

Re: [sqlite] Create table returns "database disk image is malformed" when disk is full and "SQLITE_IOCAP_ATOMIC" and "SQLITE_DEFAULT_AUTOVACUUM" is enabled

2012-11-30 Thread Yongil Jang
In btreeCreateTable, a new page is allocated by allocateBtreePage function without any failures. In normal case, this should be failed because of there is no space to write journal file. jrnlWrite function called from allocateBtree is passed by writing memory block(no real file) in atomic write