Re: [sqlite] Speed Test Done !

2005-10-05 Thread Richard

You can load sqlite into memory?
I do have 2GB of RAM.

Richar
d

On Thu, 06 Oct 2005 00:04:29 -0400, Lindsay <[EMAIL PROTECTED]> wrote:


Richard wrote:



Still have found no sql program yet, that can beat Panorama in speed.



Since Panorama is RAM based, how about if you did your speed test with a  
SQLite in memory database ?








Re: [sqlite] Speed Test Done !

2005-10-05 Thread Richard

To find 32.0833 from field A, in Table T


Richard
PS: Nothing is index



On Thu, 06 Oct 2005 01:17:35 -0400, Puneet Kishor <[EMAIL PROTECTED]>  
wrote:




On Oct 5, 2005, at 10:57 PM, Richard wrote:


Well, finally import 9,337,681 records into sqlite3 test2.db
and ran the test.


import sqtest4.txt : 2 min 28 seconds
select A, '32.0833' From T ; 9 min 20 seconds


there is no constraint in the above statement... you are selecting A  
(which, I am assuming, is a column name) and a string that looks like a  
number from table T. Is that what you really want?


And, finally, have you indexed the table?



--


I use another database for MacOS X
also works on Windows, Call Panorama

Did another test, comparing database...

import sqtest4.txt : 36 seconds
select from Field A contains 32.0833 / 55 seconds found 4322 records
out of 9,337,681

Still have found no sql program yet, that can beat Panorama in speed.

Regards-
Richard Nagle
CMS





--
Puneet Kishor






Re: [sqlite] Speed Test Done !

2005-10-05 Thread Puneet Kishor


On Oct 5, 2005, at 10:57 PM, Richard wrote:


Well, finally import 9,337,681 records into sqlite3 test2.db
and ran the test.


import sqtest4.txt : 2 min 28 seconds
select A, '32.0833' From T ; 9 min 20 seconds


there is no constraint in the above statement... you are selecting A 
(which, I am assuming, is a column name) and a string that looks like a 
number from table T. Is that what you really want?


And, finally, have you indexed the table?



--


I use another database for MacOS X
also works on Windows, Call Panorama

Did another test, comparing database...

import sqtest4.txt : 36 seconds
select from Field A contains 32.0833 / 55 seconds found 4322 records
out of 9,337,681

Still have found no sql program yet, that can beat Panorama in speed.

Regards-
Richard Nagle
CMS





--
Puneet Kishor



Re: [sqlite] Speed Test Done !

2005-10-05 Thread Lindsay

Richard wrote:



Still have found no sql program yet, that can beat Panorama in speed.



Since Panorama is RAM based, how about if you did your speed test with a 
SQLite in memory database ?



--
Lindsay




[sqlite] Speed Test Done !

2005-10-05 Thread Richard

Well, finally import 9,337,681 records into sqlite3 test2.db
and ran the test.


import sqtest4.txt : 2 min 28 seconds
select A, '32.0833' From T ; 9 min 20 seconds
--


I use another database for MacOS X
also works on Windows, Call Panorama

Did another test, comparing database...

import sqtest4.txt : 36 seconds
select from Field A contains 32.0833 / 55 seconds found 4322 records
out of 9,337,681

Still have found no sql program yet, that can beat Panorama in speed.

Regards-
Richard Nagle
CMS





[sqlite] Maintaining a sequence that's not rowid

2005-10-05 Thread Clark Christensen
In my app (a perl/web-based on-line training system), I have a table of users 
with an integer primary key column, tech_id.  The tech_ids are created by a 
foreign system, and either imported with other data, or inserted as-received by 
my app.  
 
 In enhancing the app, I'm finding it desirable to insert self-registered 
technician candidates in this table with a tech_id that's outside the sequence 
of the current tech_id, a temporary tech ID.  
 
 When the tech passes the on-line exam, the tech_id would be updated with the 
permanent tech_id from the foreign DB.  I want to have SQLite generate these 
temporary IDs.  
 
 I'm looking for suggestions on how to do this with SQLite3.
 
 As a test case, I came up with this scanario:
 
  create table t1 (a integer primary key autoincrement, b text);
  create trigger deleteme after insert on t1
  begin
  delete from t1 where a = new.a;
  end;
  insert into t1 values (null, 'a');
 
 then get the last_insert_rowid
 
 which seems to work.  The table itself never holds any data, but, by virtue of 
'autoincrement', SQLite keeps track of the next value for column, "a".
 
 So, finally, my questions:  What's wrong with this scheme?  How bulletproof is 
it?  What would work better?
 
 Thanks!
 
  -Clark
 




Re: [sqlite] Transactions

2005-10-05 Thread Christian Smith
On Tue, 4 Oct 2005, Martin Engelschalk wrote:

>Hello Christian,
>
>thank you, but synchronous is already off. What i aim to avoid is
>writing the rollback - journal. In order to rollback, some additional
>writing to disk is surely unaviodable.


You'll have to write your own pager layer, as there is currently no way to
disable the rollback journal.

Note, with no rollback journal, you'll not be able to rollback a
transaction. Any updates you make will be final even before a commit.

Another option might be to use a memory database, and write periodic
snapshots to disk in the form of a SQL text file. Look at shell.c in the
SQLite source for an example of how to do this (look for implementation of
the .dump command.) The SQL file then becomes your checkpoint, and can
also be compressed quite nicely which may save disk space. This is how the
likes of HSQL works.

Of course, if this is an embedded application, memory may be a problem
with a memory database. YMMV.


>
>Martin
>
>Christian Smith schrieb:
>
>>On Tue, 4 Oct 2005, Martin Engelschalk wrote:
>>
>>
>>
>>>Hi all,
>>>
>>>it may sound strange, but I do not need transactions.  Also i do not
>>>care if the database is corrupted in case of a program or system crash.
>>>So: is it possible to disable transactions in sqlite? Mr. Mark Allan
>>>seems to have done this. Could i speed up my writes this way?
>>>
>>>
>>
>>
>>Turn off synchronous writes:
>>http://www.sqlite.org/pragma.html
>>
>>Look for the synchronous pragma. Set it to OFF:
>>sqlite> PRAGMA synchronous = OFF;
>>
>>Updates to transactions will no longer fsync() data to the disk, and
>>instead rely on OS write-back caching, which can significantly improve
>>speed at the cost of chances of corruption in case of system crash.
>>
>>
>>
>>
>>>Thanks,
>>>Martin
>>>
>>>
>>>
>>
>>
>>
>

-- 
/"\
\ /ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
 X   - AGAINST MS ATTACHMENTS
/ \


Re: [sqlite] how to secure SQLite database

2005-10-05 Thread Ulrik Petersen

Greeting sailendra,


sai kalyanam wrote:


Greetings all,

can you pls any help me how to secure sqlite database. there is no userid and 
password to open the database. what are the security issues in SQLite database. 
can you pls help in this issue.
 



You need to encrypt your database.

Dr. Hipp, the creator of SQLite, has a very reasonably priced solution.  See

http://www.hwaci.com/sw/sqlite/prosupport.html

Ulrik Petersen

--
Ulrik Petersen, Denmark




Re: [sqlite] how to secure SQLite database

2005-10-05 Thread Martin Engelschalk

Hi,

sqlite does not know users. You can restrict access using the file 
privileges for the database - file (chown / chmod). If you want 
users/passwords in your application, you have to implement this in your 
application.


Martin

sai kalyanam schrieb:


Greetings all,

can you pls any help me how to secure sqlite database. there is no userid and 
password to open the database. what are the security issues in SQLite database. 
can you pls help in this issue.

Thanks
sailendra  



-
Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort. 
 



[sqlite] how to secure SQLite database

2005-10-05 Thread sai kalyanam
Greetings all,
 
can you pls any help me how to secure sqlite database. there is no userid and 
password to open the database. what are the security issues in SQLite database. 
can you pls help in this issue.
 
Thanks
sailendra  


-
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort.