Re: [sqlite] shared cache/ test_server.c

2007-07-27 Thread John Stanton

Scott Hess wrote:

On 7/27/07, John Stanton <[EMAIL PROTECTED]> wrote:


Scott Hess wrote:


On 7/26/07, Richard Klein <[EMAIL PROTECTED]> wrote:


According to the Mozilla article referenced above, it's even worse than
that:  *All* cache pages, dirty or not, are freed at the end of *every*
transaction, even if the transaction consisted of only read operations.


I believe this is no longer true, as of a couple months ago.  Now
SQLite tracks whether any other database connection has written data,
and doesn't invalidate the pages if nobody else is writing.

I think this is completely orthogonal to shared cache.


A few questions:
 o Is this behaviour general or just in shared cache mode?  You imply
that it is the general case.
 o If it is general, how does it detect a stale cache?  By an indicator
on the file?



The sqlite changes list has the following back in April:



Do not flush the page cache (and thus avoiding a cache refill)
unless another process changes the underlying database file.



My understanding is that writes to the database increment a counter
somewhere, and after getting the shared lock readers can check that
counter to see if they can continue using their existing cache or not.
 I think the writer knows to increment both counters, so if you only
have one writer it doesn't have to flush (one writer with many readers
would flush the reader's caches).

This is the general case.  I don't know how it impacts shared cache
mode, but I would _imagine_ that the shared cache would operate the
same way.  I've not used shared cache mode anywhere, though, so my
opinion really is in the realm of imagination :-).

-scott


Thankyou.

-
To unsubscribe, send email to [EMAIL PROTECTED]
-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] how do i generate a uniqueidentifier ?

2007-07-27 Thread Trevor Talbot
Hm, something ate the last part of my message...

> Note that SQLite contains a decent PRNG which is well seeded,
> if you are running on Mac or Linux.  (We need to work on better
> seeding on Win32...)

The crypto framework on recent versions of Windows can be used to get
a good quality seed.  I'm not sure it's worth trying to do better on
older versions.  It's something that can be done dynamically, much
like the Unicode filename stuff.

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] how do i generate a uniqueidentifier ?

2007-07-27 Thread Trevor Talbot
On 7/27/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> "Trevor Talbot" <[EMAIL PROTECTED]> wrote:
> >
> > > > sqlite> select "{" || hex(randomblob(4)) || "-" || hex(randomblob(2))
> > > > || "-" || hex(randomblob(2)) ||  "-" || hex(randomblob(2)) || "-" ||
> > > > hex(randomblob(6)) || "}";
> > > > {4EA4A842-6ACA-0A81-5B42-F9E1D295BC27}
> >
> > Note that this is *NOT* a GUID/UUID.  Be very sure of your
> > requirement: if you need a GUID, write a function that uses your
> > platform tools to get one.  If you just need some long random
> > identifier, the above is fine, but don't call it a GUID.  See RFC
> > 4122.

> Please reread RFC-4122, especially section 4.4.  While Chase's
> guid is technically in violation of RFC-4122 in that it contains
> 4 extra bits of randomness, it is very close.  And in a sense,
> the extra 4 bits of randomness provide a stronger GUID than
> RFC-4122 specifies.

The reason RFC 4122 defines the format that way is to avoid collision
of the randomly generated version with other versions.  Random
generation of GUIDs is weaker than the timestamp-based version, which
is actually guaranteed to be unique rather than merely
probabilistically unique.  (Assuming perfect implementations, that is
-- I'm aware of the related practical problems of MAC number reuse,
clock sequencing storage, etc.)

If you don't pay attention to RFC 4122's defined format, what you're
generating simply isn't a GUID, and you run the risk of bad things
happening if you try to interoperate with a system that deals with
GUIDs.

Hence my warning :)

> I personally find all the syntax in RFC-4122 to be annoying
> and so I usually do my GUIDs using hex(randomblob(20)).  But
> I guess that is just personal preference.

Yeah, if all you need is something that's unique with extremely high
probability, there's not much sense in bothering with syntax designed
for working with other systems.  You already know how to meet your
needs, the rest is just pointless overhead.

> Note that SQLite contains a decent PRNG which is well seeded,
> if you are running on Mac or Linux.  (We need to work on better
> seeding on Win32...)

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Parser information

2007-07-27 Thread Joe Wilson
--- Rohit Mordani <[EMAIL PROTECTED]> wrote:
> However, how do I pass the
> SQL statement, get it parsed and populate the structure? sqlite3SelectNew()
> is a function that I saw, however that just takes in the different sections
> of the SQL Statement. I want to start with a user specified SQL query and
> eventually get the Select structure. Is there a sequence of calls that I can
> make to achieve this?

Yeah, I provided that information in the previous post.

Run sqlite3 in a debugger and set a breakpoint in sqlite3Select().
Issue a query and when the breakpoint hits, traverse the "Select* p" 
argument. That's the Select structure. Happy hacking.


   

Pinpoint customers who are looking for what you sell. 
http://searchmarketing.yahoo.com/

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] how do i generate a uniqueidentifier ?

2007-07-27 Thread drh
"Trevor Talbot" <[EMAIL PROTECTED]> wrote:
> 
> > > sqlite> select "{" || hex(randomblob(4)) || "-" || hex(randomblob(2))
> > > || "-" || hex(randomblob(2)) ||  "-" || hex(randomblob(2)) || "-" ||
> > > hex(randomblob(6)) || "}";
> > > {4EA4A842-6ACA-0A81-5B42-F9E1D295BC27}
> 
> Note that this is *NOT* a GUID/UUID.  Be very sure of your
> requirement: if you need a GUID, write a function that uses your
> platform tools to get one.  If you just need some long random
> identifier, the above is fine, but don't call it a GUID.  See RFC
> 4122.
> 

Please reread RFC-4122, especially section 4.4.  While Chase's
guid is technically in violation of RFC-4122 in that it contains
4 extra bits of randomness, it is very close.  And in a sense,
the extra 4 bits of randomness provide a stronger GUID than
RFC-4122 specifies.

I personally find all the syntax in RFC-4122 to be annoying
and so I usually do my GUIDs using hex(randomblob(20)).  But
I guess that is just personal preference.

Note that SQLite contains a decent PRNG which is well seeded,
if you are running on Mac or Linux.  (We need to work on better
seeding on Win32...)

--
D. Richard Hipp <[EMAIL PROTECTED]>


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] how do i generate a uniqueidentifier ?

2007-07-27 Thread Trevor Talbot
On 7/27/07, Chase <[EMAIL PROTECTED]> wrote:

> hhmmm... i just noticed something weird.  if i insert a string of ANY
> length or format into the uniqueidentifier field, sqlite allows it...

> so i guess it's just a text type under the hood with no rules enforced
> on the format of the string inserted into it.

sqlite datatypes are not like other database systems you may be used
to: http://sqlite.org/datatype3.html

> not sure if i like that.

Browse through the docs to make sure sqlite is actually what you want :)

> > sqlite> select "{" || hex(randomblob(4)) || "-" || hex(randomblob(2))
> > || "-" || hex(randomblob(2)) ||  "-" || hex(randomblob(2)) || "-" ||
> > hex(randomblob(6)) || "}";
> > {4EA4A842-6ACA-0A81-5B42-F9E1D295BC27}

Note that this is *NOT* a GUID/UUID.  Be very sure of your
requirement: if you need a GUID, write a function that uses your
platform tools to get one.  If you just need some long random
identifier, the above is fine, but don't call it a GUID.  See RFC
4122.

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Re: how do i generate a uniqueidentifier ?

2007-07-27 Thread Igor Tandetnik

Chase <[EMAIL PROTECTED]> wrote:

hhmmm... i just noticed something weird.  if i insert a string of ANY
length or format into the uniqueidentifier field, sqlite allows it...


SQLite allows any data in any column. This is a feature, not a bug. For 
more details, see


http://sqlite.org/datatype3.html


not sure if i like that.


Then I guess SQLite is not suitable for your needs. Manifest typing is 
one of fundamental architectural decisions behind SQLite engine.


Igor Tandetnik 



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] how do i generate a uniqueidentifier ?

2007-07-27 Thread drh
"Chase" <[EMAIL PROTECTED]> wrote:
> how do i generate a uniqueidentifier ?
> 

   hex(randomblob(16))

--
D. Richard Hipp <[EMAIL PROTECTED]>


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] Extremely new to SQLite

2007-07-27 Thread James Dennett


> -Original Message-
> From: Rahul Banerjee [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 27, 2007 1:34 PM
> To: sqlite-users@sqlite.org
> Subject: [sqlite] Extremely new to SQLite
> 
> Hi,
> I'm trying to integrate SQLite into a library management system coded
in
> C++. I'm extremely new to SQLite and the documentation at
> http://www.sqlite.org didn't do it for me.
> Can anyone give me some help/tips.
> All I need to do is:
> 1. Access db

See the docs on sqlite3_open() for getting a handle to a database.

> 2. Retrieve data from a particular row and column (and store it into a
> var)

I'd recommend using sqlite3_prepare_v2 to prepare the statement, the
various sqlite3_bind_*() functions to bind variables, and then
sqlite3_step() to execute it.  You'll prepare something lke "select col1
from table2 where col2=:1" (or one of various placeholder syntaxes
supported by SQLite3).  Obviously you'll need some understanding of SQL
in general, which is largely not specific to SQLite.

> 3. Write/Modify data into db

Pretty much the same as selecting data, but with different SQL.

> 4. Save and exit db

You don't "save"; you "commit;" your transaction, if you started one.
If you didn't start one explicitly, there's nothing to do; the library
will commit after each statement.  That's the joy of Durability in ACID.

-- James


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] how do i generate a uniqueidentifier ?

2007-07-27 Thread Alberto Simões
Hi, Chase.

On 7/27/07, Chase <[EMAIL PROTECTED]> wrote:
>
> idfoo  bar
> ___
>
> {0109--0010-8000-00AA006D2EA4}"Aaa""Bbb"
>

I can't understand why do you need a big identifier like that, instead
of just a different integer as a key (as said below).

> >   {fieldname} INTEGER NOT NULL PRIMARY KEY

Note that the integer will be quite faster.
Cheers
-- 
Alberto Simões

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Re: how do i generate a uniqueidentifier ?

2007-07-27 Thread Igor Tandetnik

Chase <[EMAIL PROTECTED]> wrote:

here's the create table line:

CREATE TABLE foobar (id uniqueidentifier, foo text, bar text, PRIMARY
KEY (id));

that works great, but i have not been able so far to generate a fresh
guid to insert into the table.

in ms-sql, you'd use newid(), for example:

insert into foobar values (newid(), "Aaa", "Bbb");


There's nothing built into SQLite for this, but you can always create a 
custom function named "newid" that would do the same.


Igor Tandetnik 



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Extremely new to SQLite

2007-07-27 Thread Rahul Banerjee

Hi,
I'm trying to integrate SQLite into a library management system coded in 
C++. I'm extremely new to SQLite and the documentation at 
http://www.sqlite.org didn't do it for me.

Can anyone give me some help/tips.
All I need to do is:
1. Access db
2. Retrieve data from a particular row and column (and store it into a var)
3. Write/Modify data into db
4. Save and exit db

Any help is greatly appreciated!
Thanks,
Rahul.

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Parser information

2007-07-27 Thread Rohit Mordani
Hi Joe,
  Thanks a lot for pointing me to that structure and the method - I
think that was something that I was looking for. However, how do I pass the
SQL statement, get it parsed and populate the structure? sqlite3SelectNew()
is a function that I saw, however that just takes in the different sections
of the SQL Statement. I want to start with a user specified SQL query and
eventually get the Select structure. Is there a sequence of calls that I can
make to achieve this?

Thanks
Rohit


On 7/26/07, Joe Wilson <[EMAIL PROTECTED]> wrote:
>
> --- Rohit Mordani <[EMAIL PROTECTED]> wrote:
> > I wanted to know if I can reuse the parser from sqlite. I want the
> > different sections of the query (like the SELECT part, the FROM part
> etc.) I
> > wanted to know if there is a parsed tree of some sorts that is the end
> > result of parsing (in sqlite) and if I can use this tree to retrieve the
> > different sections of the query (SELECT part, FROM part etc.). If it is
> > possible, then could someone tell me which structure holds the parse
> tree
> > and how I can get a handle to the root node of that tree? Looking at the
> > code I see that the sParse object holds the pVdbe member - but that
> holds
> > the transformed query (to VDBE) - That is not what I want.
>
> See sqlite3PrintSelect() in select.c.
>
> Or for more detailed output:
>
>   http://www.mail-archive.com/sqlite-users@sqlite.org/msg17096.html
>
>
>
>   
> 
> Park yourself in front of a world of choices in alternative vehicles.
> Visit the Yahoo! Auto Green Center.
> http://autos.yahoo.com/green_center/
>
>
> -
> To unsubscribe, send email to [EMAIL PROTECTED]
>
> -
>
>


RE: [sqlite] how do i generate a uniqueidentifier ?

2007-07-27 Thread Samuel R. Neff

I don't think there's any built-in way but you can create a custom function
for it pretty easily.  Are you using sqlite directly or a wrapper?

Sam 


---
We're Hiring! Seeking a passionate developer to join our team building
products. Position is in the Washington D.C. metro area. If interested
contact [EMAIL PROTECTED]
 
-Original Message-
From: Chase [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 27, 2007 4:03 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] how do i generate a uniqueidentifier ?


sorry.  should have been more specific.  i'm talking about guids (or uuids).

here's the create table line:

CREATE TABLE foobar (id uniqueidentifier, foo text, bar text, PRIMARY 
KEY (id));

that works great, but i have not been able so far to generate a fresh 
guid to insert into the table.

in ms-sql, you'd use newid(), for example:

insert into foobar values (newid(), "Aaa", "Bbb");

and then you'd get something like:

select * from foobar;

idfoo  bar
___

{0109--0010-8000-00AA006D2EA4}"Aaa""Bbb"


so how is this done in sqlite3?

- chase


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] how do i generate a uniqueidentifier ?

2007-07-27 Thread Chase


sorry.  should have been more specific.  i'm talking about guids (or uuids).

here's the create table line:

CREATE TABLE foobar (id uniqueidentifier, foo text, bar text, PRIMARY 
KEY (id));


that works great, but i have not been able so far to generate a fresh 
guid to insert into the table.


in ms-sql, you'd use newid(), for example:

insert into foobar values (newid(), "Aaa", "Bbb");

and then you'd get something like:

select * from foobar;

   idfoo  bar
   ___

   {0109--0010-8000-00AA006D2EA4}"Aaa""Bbb"


so how is this done in sqlite3?

- chase




On July 27, 2007, Mark Richards wrote:


Chase wrote:


how do i generate a uniqueidentifier ?

Define a column as follows:
{fieldname} INTEGER NOT NULL PRIMARY KEY

eg:

   CREATE TABLE hardware_types (record_key INTEGER NOT NULL PRIMARY 
KEY,hardware_key INTEGER default 0);


-
To unsubscribe, send email to [EMAIL PROTECTED]
-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] how do i generate a uniqueidentifier ?

2007-07-27 Thread Mark Richards

Chase wrote:


how do i generate a uniqueidentifier ?

Define a column as follows:
{fieldname} INTEGER NOT NULL PRIMARY KEY

eg:

  CREATE TABLE hardware_types (record_key INTEGER NOT NULL PRIMARY 
KEY,hardware_key INTEGER default 0);


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] how do i generate a uniqueidentifier ?

2007-07-27 Thread Chase


how do i generate a uniqueidentifier ?

- chase



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Re: sql query required

2007-07-27 Thread Igor Tandetnik

B V, Phanisekhar <[EMAIL PROTECTED]> wrote:

Suppose I have a table:

Create table "yearofbirth INTEGER, Name string"

What will be the query to identify how many people were born in
different years? The output should contain all the years that are
present in the table and the total count corresponding to each entry.

One can use GROUP BY.


You forgot to mention the email address of your professor, so I could 
send your homework assignment directly to him or her.


Igor Tandetnik 



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] sql query required

2007-07-27 Thread P Kishor
Try

SELECT Count(Name)
FROM tablename
GROUP BY yearofbirth

On 7/27/07, B V, Phanisekhar <[EMAIL PROTECTED]> wrote:
> Suppose I have a table:
>
>
>
> Create table "yearofbirth INTEGER, Name string"
>
>
>
> What will be the query to identify how many people were born in
> different years? The output should contain all the years that are
> present in the table and the total count corresponding to each entry.
>
>
>
> Eg:
>
>
>
> 1901  rahul
>
> 1902  deepak
>
> 1901  joy
>
> 1945  deep
>
> 1953  preeti
>
> 1945  saum
>
>
>
> The output should be
>
>
>
> 1901  2
>
> 1902  1
>
> 1945  2
>
> 1953  1
>
>
>
> One can use GROUP BY.
>
>
>
> Regards,
>
> Phanisekhar
>
>


-- 
Puneet Kishor http://punkish.eidesis.org/
Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/
Open Source Geospatial Foundation http://www.osgeo.org/education/
S Policy Fellow, National Academy of Sciences http://www.nas.edu/
-
collaborate, communicate, compete
=

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] sql query required

2007-07-27 Thread B V, Phanisekhar
Suppose I have a table:

 

Create table "yearofbirth INTEGER, Name string"

 

What will be the query to identify how many people were born in
different years? The output should contain all the years that are
present in the table and the total count corresponding to each entry.

 

Eg:

 

1901  rahul

1902  deepak

1901  joy

1945  deep

1953  preeti

1945  saum

 

The output should be

 

1901  2

1902  1

1945  2

1953  1

 

One can use GROUP BY.

 

Regards,

Phanisekhar



RE: [sqlite] Is SQLite Scalable to handle large data?

2007-07-27 Thread Griggs, Donald
 

-Original Message-
From: Bharath Booshan L [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 27, 2007 4:31 AM
To: sqlite-users@sqlite.org
Subject: [sqlite] Is SQLite Scalable to handle large data?

Hello,

 I have been using SQLIte database for one of my application (stand
-alone).
It contains  12 Tables and, on average, there can be around 60 - 100
thousand of rows in one table and rest contains around 2000 rows of
information which is linked to former one.

 It is providing acceptable performance. Now we need to make this
application as Client-Server type and hence the Scalability, Concurrency
issues arises which were not at-most importance till now.

Is SQLite feasible enough to handle huge data assuring the concurrency?

Note: The application performs more SELECT operations, with limited
INSERT & UPDATE operations. So the Query results retrieval time should
be minimal.

Please provide some suggestions. I will provide more information if
needed.

Regards,
Bharath Booshan L.  
==
Hello, Bharath,

On the one hand, sqlite can indeed handle multi-million row tables in
some cases.

On the other hand, I think that many would say that your client-server
application, with significant requirements for concurrency, would be one
where sqlite might well be risky.  Something like Postgres, MySql, or
one of the conventional, commercial databases might fit your
requirements much better.

I note, however, that I'm far from being an expert in this -- perhaps
your application is an exception.

[opinions are mine, not my company's]



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] shared cache/ test_server.c

2007-07-27 Thread Scott Hess
On 7/27/07, John Stanton <[EMAIL PROTECTED]> wrote:
> Scott Hess wrote:
> > On 7/26/07, Richard Klein <[EMAIL PROTECTED]> wrote:
> >>According to the Mozilla article referenced above, it's even worse than
> >>that:  *All* cache pages, dirty or not, are freed at the end of *every*
> >>transaction, even if the transaction consisted of only read operations.
> >
> > I believe this is no longer true, as of a couple months ago.  Now
> > SQLite tracks whether any other database connection has written data,
> > and doesn't invalidate the pages if nobody else is writing.
> >
> > I think this is completely orthogonal to shared cache.
>
> A few questions:
>   o Is this behaviour general or just in shared cache mode?  You imply
> that it is the general case.
>   o If it is general, how does it detect a stale cache?  By an indicator
> on the file?

The sqlite changes list has the following back in April:

> Do not flush the page cache (and thus avoiding a cache refill)
> unless another process changes the underlying database file.

My understanding is that writes to the database increment a counter
somewhere, and after getting the shared lock readers can check that
counter to see if they can continue using their existing cache or not.
 I think the writer knows to increment both counters, so if you only
have one writer it doesn't have to flush (one writer with many readers
would flush the reader's caches).

This is the general case.  I don't know how it impacts shared cache
mode, but I would _imagine_ that the shared cache would operate the
same way.  I've not used shared cache mode anywhere, though, so my
opinion really is in the realm of imagination :-).

-scott

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] shared cache/ test_server.c

2007-07-27 Thread John Stanton

Scott Hess wrote:

On 7/26/07, Richard Klein <[EMAIL PROTECTED]> wrote:


According to the Mozilla article referenced above, it's even worse than
that:  *All* cache pages, dirty or not, are freed at the end of *every*
transaction, even if the transaction consisted of only read operations.



I believe this is no longer true, as of a couple months ago.  Now
SQLite tracks whether any other database connection has written data,
and doesn't invalidate the pages if nobody else is writing.

I think this is completely orthogonal to shared cache.

-scott



A few questions:
 o Is this behaviour general or just in shared cache mode?  You imply 
that it is the general case.
 o If it is general, how does it detect a stale cache?  By an indicator 
on the file?


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] shared cache/ test_server.c

2007-07-27 Thread John Stanton

Richard Klein wrote:



John Stanton wrote:


Richard Klein wrote:



Joe Wilson wrote:


You've probably read this. It's useful information for any performance
minded developer using SQLite:

  http://developer.mozilla.org/en/docs/Storage:Performance




 >> [snip]



If the above is correct, it is not enough for the server thread to open
connections on behalf of client threads:  The server must also open its
own connection, do a BEGIN TRANSACTION, create a dummy table containing
a single element, and then keep this dummy transaction open by *not*
doing a COMMIT.

Is this really true? I don't remember seeing this sort of dummy 
transaction code in the src/test_server.c file.


I looked through the test_server.c program and it is clearly a 
diagnostic rather than production program.  I suspect that the reason 
a transaction needs to be kept open is that Sqlite flushes all the 
cache rather than writing through it to clear dirty pages, but I don't 
understand the code enough to be sure.



According to the Mozilla article referenced above, it's even worse than
that:  *All* cache pages, dirty or not, are freed at the end of *every*
transaction, even if the transaction consisted of only read operations.

If this is true, then it seems that a shared cache would be useful only
in apps for which there are many concurrent transactions in progress.

In other words, unless your app exhibits a high degree of concurrency, a
shared cache doesn't buy you much.

- Richard



I suspect that you are correct, with the one exception that the shared 
cache mode cuts back on memory usage by avoiding replicated caches.


I have coded up a test and shall perform some measurements.  One other 
option is to look at Sqlite's flush logic and make a change for shared 
cache mode so that it writes through the cache to clean dirty pages.


Some time ago we built a product which was an embedded ISAM file manager 
using much the same principles as Sqlite.  We designed it to operate in 
two modes, one like Sqlite where each connection had its own cache and 
would write through the cache and detect a stale cache and refresh (for 
older non-POSIX OS's) it and the other mode mapped the file into VM and 
used the virtual memory as its shared cache.  The second mode runs very 
fast, but is inherently not ACID because it generally is associated with 
some form of lazy write.


In the ISAM case the data was not held in the B-tree like Sqlite and 
could be independently sync'd to disk and a damaged index recreated from 
the data to recover from a disaster.  That approach has proven to be 
robust and productive over many years of fairly large scale usage.


Perhaps there is a case for an Sqlitesuperlite stripped back for small 
scale embedded use and an Sqmediumlite for shared usage.  The "medium" 
implementation would retain the endearing features of simplicity of use 
but also be optimized towards multiple users.


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] SQLite Version 3.4.1

2007-07-27 Thread Marcel Strittmatter

Hi

The sqlite3 binary in .libs is a dynamic executable. It looks like  
you have an other installation with version 3.3.8 installed. You may  
try the following:


- run the sqlite3 executable in bld directory (statically linked)
- set LD_LIBRARY_PATH to your .libs directory and run .libs/sqlite3

Cross-compiling for ARM worked for me. See
http://www.sqlite.org/cvstrac/wiki?p=HowToCompile
for hints about crosscompile with x86 for arm.

Regards
Marcel

On 24.07.2007, at 09:58, Steinmaurer Thomas wrote:


Hello,

as an pre-excercise for cross-compiling to ARM, I first get used to  
the

whole compile process by compiling SQLite for Linux x86.

Downloaded sqlite-3.4.1.tar.gz

Then I did the following:

tar xzf sqlite-3.4.1.tar.gz
cd sqlite-3.4.1
mkdir bld
cd bld
../configure
make
make install


This also creates a .libs directory in bld. When I run the sqlite3
application in the .libs directory, it shows the version 3.3.8 and not
3.4.1. Is this as intended or did I make anything wrong?


Thanks,
Thomas




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Is SQLite Scalable to handle large data?

2007-07-27 Thread Bharath Booshan L
Hello,

 I have been using SQLIte database for one of my application (stand -alone).
It contains  12 Tables and, on average, there can be around 60 - 100
thousand of rows in one table and rest contains around 2000 rows of
information which is linked to former one.

 It is providing acceptable performance. Now we need to make this
application as Client-Server type and hence the Scalability, Concurrency
issues arises which were not at-most importance till now.

Is SQLite feasible enough to handle huge data assuring the concurrency?

Note: The application performs more SELECT operations, with limited INSERT &
UPDATE operations. So the Query results retrieval time should be minimal.

Please provide some suggestions. I will provide more information if needed.

Regards,

Bharath Booshan L.  



---
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an 
intended recipient, please notify the sender and delete all copies. Emails to 
and from our network may be logged and monitored. This email and its 
attachments are scanned for virus by our scanners and are believed to be safe. 
However, no warranty is given that this email is free of malicious content or 
virus.



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] fts2 in the amalgamation source?

2007-07-27 Thread Marco Bambini

I have modified the Makefile, so I have added:

SRC += \
  $(TOP)/ext/fts2/fts2.c \
  $(TOP)/ext/fts2/fts2.h \
  $(TOP)/ext/fts2/fts2_hash.c \
  $(TOP)/ext/fts2/fts2_hash.h \
  $(TOP)/ext/fts2/fts2_porter.c \
  $(TOP)/ext/fts2/fts2_tokenizer.h \
  $(TOP)/ext/fts2/fts2_tokenizer1.c

make sqlite3.c works fine
and I was able to compile it.

Hope this help.
---
Marco Bambini
http://www.sqlabs.net
http://www.sqlabs.net/blog/
http://www.sqlabs.net/realsqlserver/



On Jul 26, 2007, at 4:41 PM, [EMAIL PROTECTED] wrote:


"David Crawshaw" <[EMAIL PROTECTED]> wrote:

Hello all,

I was wondering if it would be possible to include fts2 in the
amalgamated version of the source code. It looks like all that needs
to be done is add

tclsh $(TOP)/ext/fts2/mkfts2amal.tcl

to the end of the target_source target in Makefile.in and then add

fts2amal.c

to the end of the "foreach file" loop in tool/mksqlite3c.tcl. I
hesitate because with the scripts effectively written for this, there
is probably a reason why fts2 has been omitted.



The reason fts2 is omitted is that there are name collisions
between internal symbols of fts2 and the SQLite core.  So the
two entities cannot exist in the same translation unit.  I've
been meaning to go in and resolve the conflicts, but have not
gotten around to that yet.

--
D. Richard Hipp <[EMAIL PROTECTED]>


-- 
---

To unsubscribe, send email to [EMAIL PROTECTED]
-- 
---





-
To unsubscribe, send email to [EMAIL PROTECTED]
-