Re: [sqlite] Preserving column size

2010-03-29 Thread Tim Romano
On 3/29/2010 4:19 PM, Kevin M. wrote: > I have a C/C++ application in which I want to store data from a struct into a > table (using SQLite 3.6.23) and later retrieve data from the table and store > it back in the struct. But, I need a general interface for this as there are > many types of

Re: [sqlite] Preserving column size

2010-03-29 Thread Dan Bishop
Kevin M. wrote: > I have a C/C++ application in which I want to store data from a struct into a > table (using SQLite 3.6.23) and later retrieve data from the table and store > it back in the struct. But, I need a general interface for this as there are > many types of structs used. So, what

[sqlite] chidb: A didactic RDBMS (based on SQLite)

2010-03-29 Thread Borja Sotomayor
Hi everyone, I'd like to share a project we've developed at the University of Chicago, as it may be of interest to some people on this list, specially those involved in higher education: http://people.cs.uchicago.edu/~borja/chidb/ chidb is a didactic relational database management

Re: [sqlite] Berkeley DB adds SQL using SQLite API !!

2010-03-29 Thread Alexey Pechnikov
Hello! On Monday 29 March 2010 22:26:41 D. Richard Hipp wrote: > I can come up with additional reasons why replacing the existing > SQLite backend with TC is not a good idea, but perhaps the above will > suffice. But how about insert/update performance on big indices? When index size is more

[sqlite] More Mac problems - building 3.6.23

2010-03-29 Thread Dave Dyer
Attempting to build 2.6.23 command shell under osx 10.4.11 doesn't work because of unlinked symbol gethostuuid, which seems to be associated with the SQLITE_ENABLE_LOCKING_STYLE option Compiling with SQLITE_ENABLE_LOCKING_STYLE=0 links, and works on native disks, but fails immediately on

Re: [sqlite] Preserving column size

2010-03-29 Thread Jay A. Kreibich
On Mon, Mar 29, 2010 at 02:01:42PM -0700, Kevin M. scratched on the wall: > > Can't you just store the struct as a blob and be done with it? > > No, I can't use a blob because there are other queries where I want > individual columns. Storing to and from a struct is only one part > of the

Re: [sqlite] Preserving column size

2010-03-29 Thread Kevin M.
> I'm confused. Do you, or don't you, want to use type names like INT1 or INT2 > to indicate the width in bytes of an integer field? If you do, you can act on > them yourself using sqlite3_column_decltype. If you don't, the question > remains: how do you plan to indicate the width of the field?

Re: [sqlite] Preserving column size

2010-03-29 Thread P Kishor
On Mon, Mar 29, 2010 at 4:14 PM, Tim Romano wrote: > On Mon, Mar 29, 2010 at 4:19 PM, Kevin M. wrote: > >> I have a C/C++ application in which I want to store data from a struct into >> a table (using SQLite 3.6.23) and later retrieve data from the

Re: [sqlite] Preserving column size

2010-03-29 Thread Tim Romano
On Mon, Mar 29, 2010 at 4:19 PM, Kevin M. wrote: > I have a C/C++ application in which I want to store data from a struct into > a table (using SQLite 3.6.23) and later retrieve data from the table and > store it back in the struct. But, I need a general interface for this

Re: [sqlite] Preserving column size

2010-03-29 Thread Igor Tandetnik
Kevin M. wrote: >> Why is 99 a 16-bit integer value and not, say, an 8-bit or a 32-bit >> one? How is SQLite supposed to know? > > How would SQLite know if "99" is 16-bit, 8-bit, 32-bit, etc... using > the CREATE TABLE specified data types as a hint. INT1, INT2 and so on

Re: [sqlite] Preserving column size

2010-03-29 Thread D. Richard Hipp
On Mar 29, 2010, at 4:19 PM, Kevin M. wrote: > > However, this method breaks down if a store a 16-bit integer value > like "99" and SQLite stores it internally as an 8-bit value (to save > space) and subsequently retrieves it and gives me a value of 1 for > sqlite3_column_bytes(). I think

Re: [sqlite] Preserving column size

2010-03-29 Thread Kevin M.
> Can't you just store the struct as a blob and be done with it? No, I can't use a blob because there are other queries where I want individual columns. Storing to and from a struct is only one part of the application. Sorry, perhaps I should have specified that too. > Why is 99 a 16-bit

Re: [sqlite] Preserving column size

2010-03-29 Thread Pavel Ivanov
> So, is there a way I can tell SQLite to preserve the data size in a > particular column? As long as you use blobs to store your structs, yes you can tell SQLite to preserve data size. You cannot do that for any other type, but it sounds like you don't need any other type because all you need

Re: [sqlite] Preserving column size

2010-03-29 Thread Igor Tandetnik
Kevin M. wrote: > I have a C/C++ application in which I want to store data from a > struct into a table (using SQLite 3.6.23) and later retrieve data > from the table and store it back in the struct. But, I need a > general interface for this as there are many types of

[sqlite] Preserving column size

2010-03-29 Thread Kevin M.
I have a C/C++ application in which I want to store data from a struct into a table (using SQLite 3.6.23) and later retrieve data from the table and store it back in the struct. But, I need a general interface for this as there are many types of structs used. So, what I have is a function

Re: [sqlite] Berkeley DB adds SQL using SQLite API !!

2010-03-29 Thread D. Richard Hipp
On Mar 29, 2010, at 1:56 PM, Alexey Pechnikov wrote: > Hello! > > On Monday 29 March 2010 20:22:36 D. Richard Hipp wrote: >> SQLite version 1 used gdbm for storage. There were many problems >> with >> that approach: (1) gdbm is a hash-based system so it could not do >> range queries (2) gdbm

Re: [sqlite] Berkeley DB adds SQL using SQLite API !!

2010-03-29 Thread Alexey Pechnikov
Hello! On Monday 29 March 2010 20:22:36 D. Richard Hipp wrote: > SQLite version 1 used gdbm for storage. There were many problems with > that approach: (1) gdbm is a hash-based system so it could not do > range queries (2) gdbm is GPL, (3) Each table and index is in a > separate file so

Re: [sqlite] SQLite over NFS

2010-03-29 Thread Nicolas Williams
On Mon, Mar 29, 2010 at 07:50:38AM -0700, Kumar, Abhinav wrote: > I am using SQLite version 3.5.9. My db sizes are 50-100 Gb. My DB is a > typical star schema. I am seeing an order of magnitude more time to do > a simple select query when doing over NFS (30-60 seconds) as compared > to local disk

Re: [sqlite] Unwanted CLI CR-LF to LF conversion

2010-03-29 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tomáš Szépe wrote: > Happens even with CLI ".read" command. > I believe this to be a bug. You are supplying text to a text based program and finding that it treats text as text :-) Note that on Unix end of line is LF and that is exactly what is

Re: [sqlite] Northwind example database

2010-03-29 Thread Gabor Grothendieck
It would be nice if SQLite had a strptime-like function for things like this and not just strftime. On Mon, Mar 29, 2010 at 10:13 AM, Griggs, Donald wrote: > > > On 27 Mar 2010, at 10:46am, GeoffW wrote: > >> Just for educational purposes I have been experimenting a

Re: [sqlite] Berkeley DB adds SQL using SQLite API !!

2010-03-29 Thread D. Richard Hipp
On Mar 29, 2010, at 12:03 PM, Jay A. Kreibich wrote: > On Mon, Mar 29, 2010 at 09:15:45AM +0530, Roger Binns scratched on > the wall: > >> I believe the btree/paging layer is replaced with BDB. > > Didn't SQLite "1" use a dbm library for the storage layer? > > The more things change >

Re: [sqlite] Berkeley DB adds SQL using SQLite API !!

2010-03-29 Thread Jay A. Kreibich
On Mon, Mar 29, 2010 at 09:15:45AM +0530, Roger Binns scratched on the wall: > I believe the btree/paging layer is replaced with BDB. Didn't SQLite "1" use a dbm library for the storage layer? The more things change -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Our

Re: [sqlite] Tera-byte Scalability

2010-03-29 Thread Simon Slavin
On 29 Mar 2010, at 4:33pm, P Kishor wrote: > On Mon, Mar 29, 2010 at 10:26 AM, Simon Slavin wrote: >> > Well, if by "SQLite can handle" the OP wants to know whether or not > SQLite "can store" *.mts* files, then, yes... SQLite is capable of > storing any binary blobs. It

Re: [sqlite] Tera-byte Scalability

2010-03-29 Thread Jay A. Kreibich
On Mon, Mar 29, 2010 at 10:33:53AM -0500, P Kishor scratched on the wall: > On Mon, Mar 29, 2010 at 10:26 AM, Simon Slavin wrote: > > > > On 29 Mar 2010, at 3:36pm, Navaneeth Sen B wrote: > > > >> Does that mean it cannot support data sizes greater than 1TB. > >> I would

Re: [sqlite] Tera-byte Scalability

2010-03-29 Thread P Kishor
On Mon, Mar 29, 2010 at 10:26 AM, Simon Slavin wrote: > > On 29 Mar 2010, at 3:36pm, Navaneeth Sen B wrote: > >> Does that mean it cannot support data sizes greater than 1TB. > > SQLite can handle whatever your file system can handle.  Probably 4TB, if > your OS will handle

Re: [sqlite] Berkeley DB adds SQL using SQLite API !!

2010-03-29 Thread P Kishor
On Mon, Mar 29, 2010 at 3:23 AM, Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > P Kishor wrote: >> thanks for the clarification, but how does the above statement >> reconcile with "the btree/paging layer is replaced with BDB"? Does >> that refer to

Re: [sqlite] Tera-byte Scalability

2010-03-29 Thread Simon Slavin
On 29 Mar 2010, at 3:36pm, Navaneeth Sen B wrote: > Does that mean it cannot support data sizes greater than 1TB. SQLite can handle whatever your file system can handle. Probably 4TB, if your OS will handle that much. However there are a number of limits involved in what it does. You're

Re: [sqlite] SQLite over NFS

2010-03-29 Thread D. Richard Hipp
On Mar 29, 2010, at 10:50 AM, Kumar, Abhinav wrote: > Hi, > > I am using SQLite version 3.5.9. My db sizes are 50-100 Gb. My DB is > a typical star schema. I am seeing an order of magnitude more time > to do a simple select query when doing over NFS (30-60 seconds) as > compared to local

Re: [sqlite] sqlite bug with collating sequences?

2010-03-29 Thread D. Richard Hipp
On Mar 29, 2010, at 10:40 AM, Jay A. Kreibich wrote: > On Mon, Mar 29, 2010 at 12:16:57PM +0200, Rickard Utgren scratched > on the wall: >> On Mon, Mar 29, 2010 at 12:07, Dan Kennedy >> wrote: >> >>> This database was created with a different version of the collation

[sqlite] SQLite over NFS

2010-03-29 Thread Kumar, Abhinav
Hi, I am using SQLite version 3.5.9. My db sizes are 50-100 Gb. My DB is a typical star schema. I am seeing an order of magnitude more time to do a simple select query when doing over NFS (30-60 seconds) as compared to local disk (2 seconds). Is there any way to optimize this ? Thanks,

[sqlite] Poor query planning with GROUP BY on virtual tables in release 3.6.23.1

2010-03-29 Thread Alexey Pechnikov
Hello! create view view_role as select role.id as rowid, role.uid, role.timestamp, role.user_id, role_fts.* from role, role_fts where role_fts.rowid=role.id group by uid having timestamp=max(timestamp); sqlite> explain query plan select * from view_role where rowid=1000; 0|1|TABLE role_fts

Re: [sqlite] sqlite bug with collating sequences?

2010-03-29 Thread Jay A. Kreibich
On Mon, Mar 29, 2010 at 12:16:57PM +0200, Rickard Utgren scratched on the wall: > On Mon, Mar 29, 2010 at 12:07, Dan Kennedy wrote: > > > This database was created with a different version of the collation > > sequence than found in the script. I think the -nocase switch

[sqlite] Tera-byte Scalability

2010-03-29 Thread Navaneeth Sen B
Hello all, I would like to get a clarification on one point: "SQLite has had to sacrifice other characteristics that some people find useful, such as high concurrency, fine-grained access control, a rich set of built-in functions, stored procedures, esoteric SQL language features, XML and/or

Re: [sqlite] Northwind example database

2010-03-29 Thread Griggs, Donald
On 27 Mar 2010, at 10:46am, GeoffW wrote: > Just for educational purposes I have been experimenting a little with > the Northwind Sqlite database contained on the sqlite official site. > Download link: http://download.vive.net/Northwind.zip. > > Am I misunderstanding here or are the dates in

Re: [sqlite] Will CEROD work with the new BerkleyDB implementation?

2010-03-29 Thread D. Richard Hipp
On Mar 29, 2010, at 9:08 AM, Garry Watkins wrote: > Will CEROD work with the new BerkleyDB implementation? Please understand that the new SQL parser on BDB is entirely the work of Oracle and is independent of SQLite. We here at SQLite.org have not participated in that effort. We don't

[sqlite] Will CEROD work with the new BerkleyDB implementation?

2010-03-29 Thread Garry Watkins
Will CEROD work with the new BerkleyDB implementation? -- Garry Watkins Managing Director DynaFOCUS, LLC ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] sqlite memory consume..

2010-03-29 Thread spaccabbomm
Hi, why this code consume free memory ? the same code but 'UPDATE' works fine any help? #include #include #include "sqlite3.h" int main(int argc, char **argv) { sqlite3 *db; char *zErrMsg = 0; int rc; char st1[200]; sqlite3_initialize(); //

Re: [sqlite] sqlite bug with collating sequences?

2010-03-29 Thread Rickard Utgren
On Mon, Mar 29, 2010 at 12:07, Dan Kennedy wrote: > This database was created with a different version of the collation > sequence than found in the script. I think the -nocase switch was > probably passed to [string compare]. You are correct, it was creates with this

Re: [sqlite] sqlite bug with collating sequences?

2010-03-29 Thread Dan Kennedy
On Mar 29, 2010, at 4:55 PM, Rickard Utgren wrote: > I've managed to break a database, and I think it's related to defining > new text collating sequences in Tcl. If I run "VACUUM" on it, it works > fine again. I was told that this would likely be a bug in SQLite. This database was created with

[sqlite] sqlite bug with collating sequences?

2010-03-29 Thread Rickard Utgren
I've managed to break a database, and I think it's related to defining new text collating sequences in Tcl. If I run "VACUUM" on it, it works fine again. I was told that this would likely be a bug in SQLite. I've created a tarball with my broken database, and a small Tcl script that showcases the

Re: [sqlite] Berkeley DB adds SQL using SQLite API !!

2010-03-29 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 P Kishor wrote: > thanks for the clarification, but how does the above statement > reconcile with "the btree/paging layer is replaced with BDB"? Does > that refer to a different version of SQLite being offered by Oracle > that includes BDB for