Re: [sqlite] get the actual database size.

2008-05-30 Thread Mihai Limbasan
Joanne Pham wrote: Hi All, I have the database which has a lot of insertion and deletion. Is there anyway that I can get the actual database size without running VACUUM. Thanks, JP Hi, Joanne. I assume that by "actual database size" you mean "the size of the database file minus the size of

Re: [sqlite] get the actual database size.

2008-05-30 Thread Darren Duncan
P Kishor wrote: > On 5/29/08, Joanne Pham <[EMAIL PROTECTED]> wrote: >> Hi All, >> I have the database which has a lot of insertion and deletion. >> Is there anyway that I can get the actual database size without running >> VACUUM. > > Your question implies that VACUUM lets you "get the

Re: [sqlite] get the actual database size.

2008-05-30 Thread Ronny Dierckx
Hi, I think a possible solution is to calculate the difference between the database file size and the number of free pages multiplied by the page size. This is of course an approximation, but it works for me. Number of free pages: pragma freelist_count Page size: pragma page_size Ronny

[sqlite] changed default ordering of SELECT queries in 3.5.9?

2008-05-30 Thread Jens Miltner
Hi, I've got a question and I don't know exactly whether the behavior is standard or expected or not. Assuming the following schema and data: CREATE TABLE t1 (id, name); INSERT INTO t1 values (1, 'John'); INSERT INTO t1 values (2, 'Arnold'); INSERT INTO t1 values (3, 'Zork'); We

[sqlite] Follow-up: changed default ordering of SELECT queries in 3.5.9?

2008-05-30 Thread Jens Miltner
Am 30.05.2008 um 12:45 schrieb Jens Miltner: > Hi, > > I've got a question and I don't know exactly whether the behavior is > standard or expected or not. > > Assuming the following schema and data: > CREATE TABLE t1 (id, name); > INSERT INTO t1 values (1, 'John'); > INSERT INTO t1 values

Re: [sqlite] Follow-up: changed default ordering of SELECT queries in 3.5.9?

2008-05-30 Thread Jens Miltner
Am 30.05.2008 um 12:55 schrieb Jens Miltner: > > Am 30.05.2008 um 12:45 schrieb Jens Miltner: > >> Hi, >> >> I've got a question and I don't know exactly whether the behavior >> is standard or expected or not. >> >> Assuming the following schema and data: >> CREATE TABLE t1 (id, name); >>

Re: [sqlite] Follow-up: changed default ordering of SELECT queries in 3.5.9?

2008-05-30 Thread Ralf Junker
Hello Jens Miltner, >However, I'd still like to know whether the new behavior of returning >the DISTINCT results in 'arbitrary' order is expected. Unless ORDER BY is specified, the result of any SELECT is by definition undefined. This undefined sort order has changed between previous versions

Re: [sqlite] changed default ordering of SELECT queries in 3.5.9?

2008-05-30 Thread D. Richard Hipp
On May 30, 2008, at 6:45 AM, Jens Miltner wrote: > I'm suspecting that there is nothing that guarantees the order in > which results are returned unless I explicitely specify an "ORDER BY" > term, Correct. SQLite (and all other SQL database engines) are free to return results in whatever

Re: [sqlite] Follow-up: changed default ordering of SELECT queries in 3.5.9?

2008-05-30 Thread D. Richard Hipp
On May 30, 2008, at 7:52 AM, Ralf Junker wrote: > This undefined sort order has changed between previous versions and > might do so again in the future. I would change "might" in the previous sentence to "probably". ;-) D. Richard Hipp [EMAIL PROTECTED]

[sqlite] Setting Precision for Floating Point data

2008-05-30 Thread MoDementia
After experiencing some difficulty with comparing dates stored internally as a floating point I was informed about the following. "... due to the way floats are stored in computers, '=' isn't really a good choice of an operator for them. Instead of Date = 38953.5890509 you should use Date >

Re: [sqlite] Setting Precision for Floating Point data

2008-05-30 Thread John Stanton
Use integers if you want to assign a specific scale and precision. Because floating point numbers are an approximation you can enforce a certain precision by calculating differences. You cannot use equality with FP but you can decide that equality is when (A - B) < |N| where N is the

Re: [sqlite] Setting Precision for Floating Point data

2008-05-30 Thread Jay A. Kreibich
On Fri, May 30, 2008 at 08:16:51AM -0500, John Stanton scratched on the wall: > Use integers if you want to assign a specific scale and precision. > Because floating point numbers are an approximation you can enforce a > certain precision by calculating differences. > You cannot use equality

[sqlite] Max data in row

2008-05-30 Thread Hildemaro Carrasquel
How many rows can i insert in one table? -- Ing. Hildemaro Carrasquel Ingeniero de Proyectos Cel.: 04164388917/04121832139 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Max data in row

2008-05-30 Thread Ken
I'm not 100% sure but I think the answer is: 1,844,674,407,370,9551,615 which is an unsigned int (64bit). Hildemaro Carrasquel <[EMAIL PROTECTED]> wrote: How many rows can i insert in one table? -- Ing. Hildemaro Carrasquel Ingeniero de Proyectos Cel.: 04164388917/04121832139

Re: [sqlite] Max data in row

2008-05-30 Thread Jay A. Kreibich
On Fri, May 30, 2008 at 07:40:13AM -0700, Ken scratched on the wall: > Hildemaro Carrasquel <[EMAIL PROTECTED]> wrote: > > > > How many rows can i insert in one table? > I'm not 100% sure but I think the answer is: > > 1,844,674,407,370,9551,615 > > which is an unsigned int (64bit). RowIDs

Re: [sqlite] get the actual database size.

2008-05-30 Thread Joanne Pham
Thanks for response. I know the VACUUM is recovers the space left behind by deleting data from db but this is very expensive operator and it holds the locks for this database which will be the big impact for other operations like inserting/updating  the database. I can read tye size of file in

Re: [sqlite] get the actual database size.

2008-05-30 Thread P Kishor
On 5/30/08, Joanne Pham <[EMAIL PROTECTED]> wrote: > > > > Thanks for response. > > I know the VACUUM is recovers the space left behind by deleting data from db > but this > > is very expensive operator and it holds the locks for this database which > will be the big impact for other operations

Re: [sqlite] get the actual database size.

2008-05-30 Thread Joanne Pham
Hi , I have two questions:     1) Calucate the actual size of the database(NOT RUN VACUUM) - "Actual database size" which won't include the space of deleted rows.         To be more specific you calculate the database size by the following below(WITHOUT VACUUM)         Database file size -

Re: [sqlite] Max data in row

2008-05-30 Thread Igor Tandetnik
Jay A. Kreibich <[EMAIL PROTECTED]> wrote: > On Fri, May 30, 2008 at 07:40:13AM -0700, Ken scratched on the wall: >> Hildemaro Carrasquel >> <[EMAIL PROTECTED]> wrote: >>> >>> How many rows can i insert in one table? > >> I'm not 100% sure but I think the answer is: >> >>

Re: [sqlite] get the actual database size.

2008-05-30 Thread Kees Nuyt
On Fri, 30 May 2008 09:18:39 -0700 (PDT), you wrote: >Hi , >I have two questions: >    1) Calucate the actual size of the database(NOT RUN VACUUM) - "Actual >database size" which won't include the space of deleted rows. >        To be more specific you calculate the database size by the

[sqlite] Connections

2008-05-30 Thread Hildemaro Carrasquel
Hello.- How many connections can i have in sqlite (simultaneously)? -- Ing. Hildemaro Carrasquel Ingeniero de Proyectos Cel.: 04164388917/04121832139 ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Connections

2008-05-30 Thread Jim Dodgen
sqlite is serverless and does not have connections in the traditional sense. The database is just a file and the number of programs that can have the file open is dependent upon the operating system. Hildemaro Carrasquel wrote: > Hello.- > > How many connections can i have in sqlite

[sqlite] Saving an in-memory database to file

2008-05-30 Thread Mark Stewart
Is there a recommended way to save an in-memory database to a file? Is there a way to access the underlying in-memory data directly to save out to disk (if that would even work)? My other thought was to create an empty file based db and attach it, creating tables and transferring all the data

Re: [sqlite] Saving an in-memory database to file

2008-05-30 Thread P Kishor
On 5/30/08, Mark Stewart <[EMAIL PROTECTED]> wrote: > > Is there a recommended way to save an in-memory database to a file? Is there > a way to access the underlying in-memory data directly to save out to disk > (if that would even work)? > > My other thought was to create an empty file based

Re: [sqlite] Saving an in-memory database to file

2008-05-30 Thread Bruce Robertson
Well, an interesting illustration of basic sqlite; but no relation to the question being asked. > On 5/30/08, Mark Stewart <[EMAIL PROTECTED]> wrote: >> >> Is there a recommended way to save an in-memory database to a file? Is >> there >> a way to access the underlying in-memory data

Re: [sqlite] Saving an in-memory database to file

2008-05-30 Thread Jay A. Kreibich
On Fri, May 30, 2008 at 09:24:29PM -0700, Bruce Robertson scratched on the wall: > Well, an interesting illustration of basic sqlite; but no relation to the > question being asked. Actually, it is a good answer to the question that was asked. Running SQLite without a database file creates an