[sqlite] Bogdan Ureche -- SQLite Expert

2007-06-14 Thread Don Lewis
Your www.sqliteexpert.com domain has expired. Email is underliverable to both [EMAIL PROTECTED] and the domain's registered contact address listed in the whois data. Is this an oversite or are you abandoning SQLiteExpert? I hope not, it's handy program. Don

RE: [sqlite] PRAGMA cache_size = 0

2007-06-14 Thread B V, Phanisekhar
>> What exactly happens when I change the cache_size (both increase and >> decrease size)? > A variable is set. It seems this term is a misnomer. What are we achieving by setting this variable? This is what is mentioned in the documentation of SQLITE: PRAGMA cache_size; PRAGMA cache_size =

Re: [sqlite] MMap On Solaris

2007-06-14 Thread John Stanton
The behaviour depends on whether you map shared or not. If for map shared multiple users can read and write to the file simultaneously. If you have a situation where you access he same bytes you need to use some form of synchronization, just as you do with read and write. You can map for

Re: [sqlite] Multiple *processes* accessing one database

2007-06-14 Thread Andrew Roark
> From: Andrew Finkenstadt <[EMAIL PROTECTED]> > To: sqlite-users@sqlite.org > Sent: Thursday, June 14, 2007 12:39:46 AM > Subject: Re: [sqlite] Multiple *processes* accessing one database > > On 6/13/07, Andrew Roark <[EMAIL PROTECTED]> wrote: > > > > My question: how well does sqlite handle one

Re: [sqlite] How can I convert from Julian time to a tm structure?

2007-06-14 Thread John Stanton
We just lifted the routines out of Sqlite to do that. They are in date.c. By making an Sqlite-style date type and a small library of date manipulation routines we move date conversion to the application. It is handy when handling ISO8601 and HTTP date formats plus integrating with file

[sqlite] SQLite 3.X Database File Format ?

2007-06-14 Thread Joe Wilson
Is there an SQLite 3.x equivalent document for this? SQLite 2.X Database File Format http://sqlite.org/fileformat.html If not, is this 2.x document worth reading as a background to the general structure of the sqlite 3.x file and page format? Or has it changed so much that it's not useful?

Re: [sqlite] Is it a bug?

2007-06-14 Thread Joe Wilson
--- Scott Hess <[EMAIL PROTECTED]> wrote: > On 6/14/07, Joe Wilson <[EMAIL PROTECTED]> wrote: > > You can't infer a function's return type from its arguments. > > Take the hypothetical function FOO(x). If I pass it a number, it will > > return the number spelled out as TEXT, but if I pass it a

Re: [sqlite] Is it a bug?

2007-06-14 Thread Scott Hess
On 6/14/07, Joe Wilson <[EMAIL PROTECTED]> wrote: You can't infer a function's return type from its arguments. Take the hypothetical function FOO(x). If I pass it a number, it will return the number spelled out as TEXT, but if I pass it a BLOB it will return its length*PI as a FLOAT. Would it

Re: [sqlite] PRAGMA cache_size = 0

2007-06-14 Thread Dan Kennedy
> What exactly happens when I change the cache_size (both increase and > decrease size)? A variable is set. > What happens to the data that's there in the result cache at the time > when the instruction PRAGMA cache_size = 0 is executed? Nothing. The aforementioned variable is set to 10

Re: [sqlite] Is it a bug?

2007-06-14 Thread BardzoTajneKonto
> The code changes are not that complex. The hard part is getting > me to agree to such a change. Surely by now you have come to > better understand my views toward static typing Isn't this decision already made? Strict affinity mode is mentioned on official SQLite site suggesting that it

Re: [sqlite] performance question: SELECT max(rowid) - 1

2007-06-14 Thread Guy Hindell
Trey Mack wrote: > I have a fairly large table (10million rows) with a simple INTEGER > PRIMARY KEY AUTOINCREMENT field. > > Executing 'SELECT max(rowid) FROM MyTable' is very fast, as is > 'SELECT min(rowid) FROM MyTable'. > > However, 'SELECT max(rowid) - min(rowid) FROM MyTable' is slow >

Re: [sqlite] Is it a bug?

2007-06-14 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > Joe Wilson <[EMAIL PROTECTED]> wrote: > > > > As a possible extension one could see sqlite3_create_function taking an > > optional argument with a hint as to its return type that sqlite may use > > for sqlite3_column_decltype. But SQLite does not currently return

Re: [sqlite] Is it a bug?

2007-06-14 Thread drh
Joe Wilson <[EMAIL PROTECTED]> wrote: > > As a possible extension one could see sqlite3_create_function taking an > optional argument with a hint as to its return type that sqlite may use > for sqlite3_column_decltype. But SQLite does not currently return any > column types for any ad-hoc

Re: [sqlite] Is it a bug?

2007-06-14 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > Thank you Joe. At least sqlite3_column_type gives me a column type I > can use as > a hint. > > The issue is that I have a well-defined column type naming convention for my > wrapper classes to look for (INT, TEXT, FLOAT, BLOB, etc.). For binary data > fields,

Re: [sqlite] performance question: SELECT max(rowid) - 1

2007-06-14 Thread P Kishor
someone else might give a more technical and scientific explanation, but my take is that "SELECT n FROM table" is just that -- a row returned for every row in the table because there is no WHERE clause constraining the results. "SELECT max() - 1 FROM table" on the other hand GROUPs the result

[sqlite] sqlite3_release_memory

2007-06-14 Thread B V, Phanisekhar
sqlite3_release_memory(int n) internally calls sqlite3pager_release_memory(int n) A negative value of input n implies free as much as you can. Suppose if the no of pages in cache = x. Will all the pages be freed when I call sqlite3_release_memory with a negative argument? If not, then what

Re: [sqlite] performance question: SELECT max(rowid) - 1

2007-06-14 Thread Guy Hindell
Ah, OK, I see that doing 'SELECT 1 FROM MyTable' returns a 1 for every row, so I can see where the effort is probably going. However, 'SELECT max(rowid) - 1 FROM MyTable' still only produces one result row (obviously I'm experimenting with a much smaller database now). Still need an

[sqlite] PRAGMA cache_size = 0

2007-06-14 Thread B V, Phanisekhar
What exactly happens when I change the cache_size (both increase and decrease size)? What happens to the data that's there in the result cache at the time when the instruction PRAGMA cache_size = 0 is executed? Will there be any memory that will be freed up when I reduce the size of result

[sqlite] performance question: SELECT max(rowid) - 1

2007-06-14 Thread Guy Hindell
I have a fairly large table (10million rows) with a simple INTEGER PRIMARY KEY AUTOINCREMENT field. Executing 'SELECT max(rowid) FROM MyTable' is very fast, as is 'SELECT min(rowid) FROM MyTable'. However, 'SELECT max(rowid) - min(rowid) FROM MyTable' is slow (apparently accessing every