Re: [sqlite] Vista frustrations

2008-09-17 Thread Robert Simpson
A full table scan of 16 million rows and 55 columns on Vista with FILE_FLAG_RANDOM_ACCESS finished in 600 seconds (cold) and 499 seconds (warm) and turned Vista into a brick. The same test with the flag removed ran in 119 seconds (cold) and 99 seconds (warm), and caused no adverse problems with

Re: [sqlite] Vista frustrations

2008-09-17 Thread Jay A. Kreibich
On Wed, Sep 17, 2008 at 06:00:45PM -0700, Roger Binns scratched on the wall: > The second is that SQLite when opening a file under Windows explicitly > tells Windows that the file will be used for random access even though > that is not the case. Windows uses this hint to override its builtin >

Re: [sqlite] Vista frustrations

2008-09-17 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brown, Daniel wrote: > Has anyone tried to replicate this bug on WindowsXP too? There are two separate bugs here. One is that when Vista is told a file is used for random access and then there is a lot of file access, it may use a little too much

Re: [sqlite] Vista frustrations

2008-09-17 Thread Brown, Daniel
Has anyone tried to replicate this bug on WindowsXP too? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Roger Binns Sent: Wednesday, September 17, 2008 4:24 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Vista frustrations -BEGIN

[sqlite] Static embedding sqlite and compiling in gcc

2008-09-17 Thread icantthinkofone
I lost my note on what I did to make this work. I've rearranged my computers for work and installed sqlite3 on Ubuntu. When I installed sqlite3, I did ./configure --disable-shared. When I recompile my working code on the new machine: gcc -static -L/usr/local/lib -I/usr/local/include mycode.o

Re: [sqlite] Vista frustrations

2008-09-17 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Robert Simpson wrote: > Ideally, at least on non-CE platforms, I'd like see SQLite not give the OS > any hints about caching. However, I'm not sure what kind of performance hit > (if any) that would have on Windows. It's already been proven that >

Re: [sqlite] Vista frustrations

2008-09-17 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Fred Williams wrote: > Have you ever actually used a version of Windows? Windows 1.0 (once), Windows 2/286, Windows 3, 3.1, 3.11, 95, 98, ME, 2000, XP, 2003 and Vista. > ANY OS that attempts to read in a xGigibyte file into real memory to the >

[sqlite] Row generation counter

2008-09-17 Thread Henrik Bechmann
Thinking through how to protect integrity of rows in an "optimistic locking" scenario, I can't see a way around either - comparing all original data values on posting an updated record to see if the underlying record had been altered after being read - comparing original record generation

Re: [sqlite] Vista frustrations

2008-09-17 Thread Jeffrey Becker
I am running vista my personal pc. I'll try to take a look into how not having this flag affects performance when I get home. On Wed, Sep 17, 2008 at 5:29 PM, Robert Simpson <[EMAIL PROTECTED]> wrote: > Ideally, at least on non-CE platforms, I'd like see SQLite not give the OS > any hints about

Re: [sqlite] Vista frustrations

2008-09-17 Thread Robert Simpson
Ideally, at least on non-CE platforms, I'd like see SQLite not give the OS any hints about caching. However, I'm not sure what kind of performance hit (if any) that would have on Windows. It's already been proven that providing the hint on WinCE is beneficial. -Original Message- From:

Re: [sqlite] Vista frustrations

2008-09-17 Thread Fred Williams
Have you ever actually used a version of Windows? ANY OS that attempts to read in a xGigibyte file into real memory to the detriment of the entire system load is not working correctly. Call it a bug or a feature it still sucks. I expect nothing less from Microsoft with each new version. I

[sqlite] Multiple Page Caches ?

2008-09-17 Thread Ken
can multiple page cache be configured ? For instance say I have one thread that uses db connections that have 2k pages and a different thread/connection that uses 4k pages. Can independent page caches be created for each? Also is there any way to have Sqlite report back the pagecache size for

Re: [sqlite] Vista frustrations

2008-09-17 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Robert Simpson wrote: > The purpose of a cache is to improve performance and responsiveness. Any > cache that uses all physical memory, forces all other apps to the paging > file All current operating systems do this, using heuristics to determine

[sqlite] pagecache not utilized

2008-09-17 Thread Ken
Hi list, I'm trying to get sqlite to utilize the pagecache and scratch buffers. But when the code exits it returns pagecache overflow and scratch buffer overflow . The to configure the pagecache and scratch are done in the main section of code  as follows: Then connections to sqlite are made

Re: [sqlite] Vista frustrations

2008-09-17 Thread Virgilio Alexandre Fornazin
Sure. I just tell to do this test to check if the bug is related to this component, since it debuted on Vista. Virgilio Alexandre Fornazin High performance and realtime systems development Rua Brigadeiro Vicente Faria Lima, 268 Bela VistaLeme-SPCEP 13611-485 Phone: +55 19 3571-5573

Re: [sqlite] Join criteria referencing case select result in 3.6.2 produces different results from 3.4.2

2008-09-17 Thread Simon Davies
2008/9/17 Dan <[EMAIL PROTECTED]>: > > >> >> On 3.4.2 we get: >> 3.0|3660.5|3 >> 6.0|1360.3|6 >> >> On 3.6.2 we get: >> |5020.8|3 >> > > 3.6.2 has a bug involving DISTINCT or GROUP BY queries that use > expression aliases (AS clauses) in the select-list. Problem is fixed > in cvs: > >

Re: [sqlite] Join criteria referencing case select result in 3.6.2 produces different results from 3.4.2

2008-09-17 Thread Dan
> Hi All, > We have been using SQLite 3.4.2 for some time. On investigating > upgrading to 3.6.2, we found that different results were produced for > one query. > The following illustrates: > ... > > On 3.4.2 we get: > 3.0|3660.5|3 > 6.0|1360.3|6 > > On 3.6.2 we get: > |5020.8|3 > 3.6.2 has a

Re: [sqlite] fts3 database grows

2008-09-17 Thread Holger Lembke
Scott, thanks again for the many lines of good hints and help. I think I will simply ignore the problem until I have real end user experience and see where it will or could end. The FullTextModul more or less has no whatever specific database interface, it is simply an abstract black hole that

[sqlite] Join criteria referencing case select result in 3.6.2 produces different results from 3.4.2

2008-09-17 Thread Simon Davies
Hi All, We have been using SQLite 3.4.2 for some time. On investigating upgrading to 3.6.2, we found that different results were produced for one query. The following illustrates: CREATE TABLE tst1( tst1Id INTEGER, width REAL, thickness REAL ); CREATE TABLE tst2( tst2Id INTEGER,

[sqlite] Program is crashed on sqlite3_finalize(pStmt);

2008-09-17 Thread Joanne Pham
Hi All, I have c++ application which is used SQLite 3.5.9. Occasionally  the application is crash on      ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users sqlite3_finalize(pStmt); Is

Re: [sqlite] Vista frustrations

2008-09-17 Thread Jeffrey Becker
SQLite in general and the .Net provider in particular are most often shipped as components of other applications. I dont think having developers tell their end users to disable superfetch is a viable solution. As much as I hate to propose this maybe a runtime check is in order to see what the OS

Re: [sqlite] Vista frustrations

2008-09-17 Thread Virgilio Alexandre Fornazin
Note that Windows Server 2008 use the same 'core' as Windows Vista. If you´re detecting and redirecting by using GetVersion() or other approach you might test for Server 2008 too. Virgilio Alexandre Fornazin High performance and realtime systems development Rua Brigadeiro Vicente Faria Lima,

Re: [sqlite] Vista frustrations

2008-09-17 Thread Robert Simpson
I've run the tests with superfetch and prefetch disabled and enabled. Results are consistent with or without these running. The only thing that has any affect is the FILE_FLAG_RANDOM_ACCESS flag. And only on Vista. For now I'm thinking of overriding the default Windows VFS and redirecting the

Re: [sqlite] Vista frustrations

2008-09-17 Thread Virgilio Alexandre Fornazin
Could not this bug be related with Vista feature called 'Superfetch' ? It tries to keep in memory the most accessed files for user, avoiding disk for read access. If you disable (or stop) this service, the problem remains or not ? Virgilio Alexandre Fornazin High performance and realtime

Re: [sqlite] Vista frustrations

2008-09-17 Thread Jay A. Kreibich
On Wed, Sep 17, 2008 at 01:17:51AM -0700, Roger Binns scratched on the wall: > Robert Simpson wrote: > > To me this seems like an obvious bug in Vista, > > Actually I'd argue that it is behaving as designed. You could argue it is behaving as designed, but I'd still argue it is behaving

Re: [sqlite] Vista frustrations

2008-09-17 Thread Fred Williams
Possibly the reason a large number of us are still running Win 2000 :-) It seems to be the least Windows like Windoze ever released... When follow on support degrades to an untenable level, I'll either switch to Linux with a Windoze emulator or maybe run whatever the future ruler of the Universe

Re: [sqlite] Vista frustrations

2008-09-17 Thread Robert Simpson
It's been reproduced on Vista x64 and x86 OS's. I don't have a pre-SP1 installation to verify if it happens against pre-patched versions. Getting a database should be easy enough ... CREATE TABLE FOO(a, b, c, d, e, f); Then do this about 16 million times or so ... whatever it takes to pump the

Re: [sqlite] Vista frustrations

2008-09-17 Thread Robert Simpson
The real frustration is that this seems to be a rather obvious bug in Vista, and definitely not SQLite's responsibility. IMO setting the flag is the "right thing to do" -- but at the same time, I don't expect any favors from Microsoft in fixing this any time soon. Meanwhile all those poor Vista

Re: [sqlite] fts3 database grows

2008-09-17 Thread Scott Hess
On Wed, Sep 17, 2008 at 12:15 AM, Holger Lembke <[EMAIL PROTECTED]> wrote: >>> So it reads: grows from 3 MB to 85 MB. >> That IS an important distinction! > > So what to do? > > a.) let it grow. > b.) do optimize() (but how often and how to detect when it is needed?) > c.) create a new database by

Re: [sqlite] Vista frustrations

2008-09-17 Thread Robert Simpson
The purpose of a cache is to improve performance and responsiveness. Any cache that uses all physical memory, forces all other apps to the paging file and turns the operating system into a brick is definitely not working as designed. -Original Message- From: [EMAIL PROTECTED]

Re: [sqlite] Getting the last row

2008-09-17 Thread Chris Wedgwood
On Wed, Sep 17, 2008 at 11:44:38AM +0530, Aravinda babu wrote: > Is there any easy way to get the last row in the table ? what do you mean by last? last by row id? then select * from t1 where oid = (select max(oid) from t1); should work ___

Re: [sqlite] [sqlite-announce] Foreign key trigger in transactiontriggers wrongly

2008-09-17 Thread Simon Davies
2008/9/17 Bjorn Rauch <[EMAIL PROTECTED]>: >> From: Simon Davies <[EMAIL PROTECTED]>> Date: 2008/9/16> Subject: Re: >> [sqlite-announce] Foreign key . . . . > Yes, indeed it works this way. But I am executing these commands from a .NET > application using SQLite.NET (SQLite for ADO.NET 2.0, >

Re: [sqlite] [sqlite-announce] Foreign key trigger in transactiontriggers wrongly

2008-09-17 Thread Bjorn Rauch
> From: Simon Davies <[EMAIL PROTECTED]>> Date: 2008/9/16> Subject: Re: > [sqlite-announce] Foreign key trigger in transaction> triggers wrongly> To: > [EMAIL PROTECTED], [EMAIL PROTECTED]> > > 2008/9/16 Björn Rauch <[EMAIL > PROTECTED]>:> > Hello,> .> .> .> > This looks to me like the trigger

Re: [sqlite] Vista frustrations

2008-09-17 Thread Filip Navara
"(*) Sun's ZFS can even detect strided sequential access - ie reading X amount of data every Y kilobytes." ... and so can the NT cache manager since the very first Windows NT release ;-) It's good to see that people are finally adapting these features 15 years later. F. On Wed, Sep 17, 2008 at

Re: [sqlite] best language match for SQLite?

2008-09-17 Thread David Mukaiwa
I C sharp code under the silver moonlight. On Wed, Sep 17, 2008 at 1:21 AM, Andy Allord < [EMAIL PROTECTED]> wrote: > How about Flex, AIR and a P backend! > > > On Sep 16, 2008, at 4:33 PM, Javier Julio wrote: > > > Um... excuse me! You can all move to the side and make room for Flex > > and

Re: [sqlite] best language match for SQLite?

2008-09-17 Thread Graeme
The Tcl interface is, as others have mentioned, the original one and suported by the sqlite developers. it is: 1) very easy to use 2) up to date 3) more complete than alternatives 4) flexible and given Richard Hipp's comment on the amount of Tcl code used to test sqlite, that looks very

Re: [sqlite] Vista frustrations

2008-09-17 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Robert Simpson wrote: > To me this seems like an obvious bug in Vista, Actually I'd argue that it is behaving as designed. Generally filesystem code will try to detect what is going on under the hood. In particular if it looks like you are doing

Re: [sqlite] Vista frustrations

2008-09-17 Thread Sherief N. Farouk
> I ran some tests using the command-line sqlite3.exe, and observed that > Windows Vista (SP1) is actually trying to cache the entire 5gb file > into > memory during the table scan! The system slows to a complete crawl and > becomes unresponsive. The sqlite3.exe's memory remains very minimal, >

Re: [sqlite] fts3 database grows

2008-09-17 Thread Holger Lembke
Scott, >> So it reads: grows from 3 MB to 85 MB. > That IS an important distinction! So what to do? a.) let it grow. b.) do optimize() (but how often and how to detect when it is needed?) c.) create a new database by reindexing my data. (same problems as b.) d.) ignore the problem until

Re: [sqlite] Closing database fails due to unfinalized statements

2008-09-17 Thread Lothar Behrens
Am 16.09.2008 um 16:51 schrieb Dan: > > On Sep 16, 2008, at 4:44 PM, Lothar Behrens wrote: > >> Hi, >> >> I do have any unfinalized statements in my application when compiled >> on Windows, but not on Mac OS X. >> >> Is there any difference I am missing to attent for ? >> >> How could I see,

Re: [sqlite] Closing database fails due to unfinalized statements

2008-09-17 Thread Lothar Behrens
Yes, that's what I expected, since my debugging attempts into my sqlite library version always failed. And it makes it clear why there are these differences. Thanks Lothar Am 16.09.2008 um 17:00 schrieb Jay A. Kreibich: > On Tue, Sep 16, 2008 at 11:44:24AM +0200, Lothar Behrens scratched

Re: [sqlite] Getting the last row

2008-09-17 Thread Darren Duncan
Aravinda babu wrote: > Is there any easy way to get the last row in the table ? What do you mean by "last row"? Do you mean you want to get back the row that was most recently inserted? If so, then the table needs to have a column containing info about insertion order of rows, such as a serial

Re: [sqlite] Getting the last row

2008-09-17 Thread Trey Mack
select * from t order by rowid desc limit 1; Thanks, Trey Mack -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Aravinda babu Sent: Wednesday, September 17, 2008 2:15 AM To: sqlite-users@sqlite.org Subject: [sqlite] Getting the last row Hi all, Is there

[sqlite] Getting the last row

2008-09-17 Thread Aravinda babu
Hi all, Is there any easy way to get the last row in the table ? Thanks, Aravind. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users