e: [sqlite] WAL file size
On Wed, Nov 30, 2011 at 1:21 PM, Black, Michael (IS) <michael.bla...@ngc.com
> wrote:
> Maybe we need a "pragma wal_trim" ?? This would automatically trim it
> after a checkpoint? Or make it an explicit action?
>
checkpoint cannot trim. This is bec
Maybe we need a "pragma wal_trim" ?? This would automatically trim it after a
checkpoint? Or make it an explicit action?
Waiting for another write before truncating it seems too late and not a logical
thing to expect.
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
In your words:
1. start "cmd.exe"
2. go to directory with sqlite3.exe
3. type test.sql | sqlite3 test.db3 (Return)
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems
.read would be one way...but this is more direct
If you have a set of SQL statements in "myfile.sql" that you want to run on
"test.db" you can do this:
type myfile.sql | sqlite3 test.db
myfile.sql example between the lines:
create table t(a int);
insert into t
You don't need to pay moneythe concepts are available all over the place
For example:
http://search.4shared.com/postDownload/AHGWfQwG/Database_Design_For_Mere_Morta.html
If you ran a BBS on a C64 you may have been running my software.
I sold a BBS system back in the early 80's (didn't
I'll note a few things here...
#1 If you want to learn about "database design" or "how to code in language X"
get a book on those and not on a particular product (you may want the product
book too if you need it but those tend to be less helpful).
#2 Your first language will be hard to get
There's a bunch of wrappers listed...you'll need to experiment unless somebody
knows what works on your device.
http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman
You need WAL mode
http://www.sqlite.org/draft/wal.html
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems
From: sqlite-users-boun...@sqlite.org
eted and I don't see why.
Maybe there should be semicolon after update statement (i.e. after END
belonging to CASE)?
Pavel
On Tue, Nov 22, 2011 at 3:50 PM, Black, Michael (IS)
<michael.bla...@ngc.com> wrote:
> How come my sqlite can't recognize this statement? It's not showing as
&g
How come my sqlite can't recognize this statement? It's not showing as
completed and I don't see why.
Using 3.7.9 with default options.
sqlite> CREATE TRIGGER tableA _InsertUpdate
...> AFTER INSERT
...> ON tableA
...> begin
...>update tableB
...>set
...>
Is there some reason you can't just write your own code?
You coulda' had it done by now.
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems
From:
That's obviously not your real code...would be nice to see that as your problem
may elsewhere.
But...
#1 How much memory does your embedded device have AVAILABLE?
#2 Try reducing the cache_size (if #1 is less than 10's of megabytes) --
default cache_size is 1MB which is right around
I was looking at this:
http://www.sqlite.org/draft/compile.html#default_wal_autocheckpoint
And was wondering how to change it.
Noticed it's missing the "the compile-time default may be overidden at runtime
by the PRAGMA wal_autocheckpoint command".
Thought someone might want to update
Why are you contorting yourself into just one query?
Your last clause would be a complete table scan seems to me. Sounds slow
versus 2 queries.
Why can't you just do this? (pseudo code here) -- no table scans involved at
all.
select docid from b where t match 'blah';
if (rowcount > 0) // the
I think you want ORDER BY COLOR,NAME
Since color is a primary key you can't have dups so what good is the group by?
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems
Doing a file copy has similar behavior. So as long as the file is cached
everything is copacetic. That's what leads me to believe it's head thrashing
causing this behavior.
./sqlite3 index2.db However, reboot again and add "select count(*) from a;" as the first line of
> gendat2.sql
>
>
of SQLite Database
Subject: EXT :Re: [sqlite] INDEX Types
2011/11/9 Black, Michael (IS) <michael.bla...@ngc.com>
OK...you're right...a reboot kills it.
>
I'm glad someone was able to reproduce this on Linux, ruling out the
possibility it's a Windows-issue.
> However, reboot again and
OK...you're right...a reboot kills it. Here's the program I generated the data
with:
#include
main()
{
char sql[4096];
char key[9];
long *lkey=key;
int i;
FILE *fp1,*fp2;
fp1=fopen("gendat1.sql","w");
fp2=fopen("gendat2.sql","w");
Are you sure you're using BEGIN/COMMIT on your transactions?
I just used my benchmark data and inserted another 100,000 rows into the
database in 2.3 seconds.
I made 1,100,000 records and cut the last 100,000 into a seperate file with
BEGIN/COMMIT on both.
time sqlite3 index.db
>
> Didn't
See if these routines and examples help you...
http://www.codeproject.com/KB/string/utfConvert.aspx
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems
From:
What happens if you run your test outside of VirtualBox?
I'm thinking when you first write the file VirtualBox does it locally and then
flushes the whole thing to system disk.
Then, when you restart the file is on system disk and it is flushing each
insert to system disk on the WAL file
have a performance impact
onqueries?
On 11/02/2011 08:13 PM, Black, Michael (IS) wrote:
> Maybe my memory is fading but this is the first time I've heard anybody say
> the wrapping a BEBIN around a SELECT was needed. I'd swear it was always
> said it wasn't ever needed.
>
>
>
You're corrupting the stack somewhere.
You can enable stack checking if you're using gcc.
-fstack-protector
-fstack-protector-all
Might help identify where it's actually happening.
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating
Maybe my memory is fading but this is the first time I've heard anybody say the
wrapping a BEBIN around a SELECT was needed. I'd swear it was always said it
wasn't ever needed.
>From the docs
http://www.sqlite.org/lang_transaction.html
basically, any SQL command other than
For .0001 worse-case just mulitply all your values by 1000 and all decimal
places will work just as you want and you can compute any difference you want
accurately and compare accurately.
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating
Have you heard of rounding errors? If you want exact numbers you need to
convert to integers:
sqlite> create table test_col (id integer,base real,thick real);
sqlite> insert into test_col values(89,281.04,0.03);
sqlite> insert into test_col values(90,282.09|1.05);
Error: table test_col has 3
...@sqlite.org [sqlite-users-boun...@sqlite.org] on
behalf of Simon Slavin [slav...@bigfraud.org]
Sent: Tuesday, November 01, 2011 9:10 AM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] Indirect Referencing
On 1 Nov 2011, at 2:01pm, Black, Michael (IS) wrote:
> Hmmm...how hard wo
Hmmm...how hard would it be allow one to bind the table name with prepare?
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems
From: sqlite-users-boun...@sqlite.org
One more thing...show us the EXPLAIN of your insert. Is sounds like your
insert is not using the index for the insert for some reason (buq in sqlite?).
You should see #3 in particular for keyinfo().
On 3.7.5 with a unique text column I get this for an insert:
sqlite> explain insert into a
You need to provide some more info...
#1 What version?
#2 How long to insert the 1M?
#3 What's the average string size?
#5 How long to create the index?
#6 How long to insert the next 10,000?
And your stated problem is simple enough you should be able to create a
complete stand-alone
I think this is (or ought to be) an FAQ.
v is considered to be random and unreliable -- you only want one record and
you're asking it to pick one-from-N without any logic (you assume order by does
this but it still returns a set and not a single value). I don't know if mysql
will give you a
1 +
> Von: "Black, Michael (IS)" <michael.bla...@ngc.com>
> An: General Discussion of SQLite Database <sqlite-users@sqlite.org>
> Betreff: Re: [sqlite] Segmentation Fault on SQLITE3_exex
> What you're showing should basically work as long it's not a single class
What you're showing should basically work as long it's not a single class
instantiation being used by multiple threads.
Also, your missing a bind on the 2nd statement.
And you're not retrieving the results of the query (I assume you left that out
for brevity).
What I would do is this to
--- Original-Nachricht ----
> Datum: Thu, 27 Oct 2011 12:12:16 +
> Von: "Black, Michael (IS)" <michael.bla...@ngc.com>
> An: General Discussion of SQLite Database <sqlite-users@sqlite.org>
> Betreff: Re: [sqlite] Segmentation Fault on SQLITE3_exex
LITE3_exex
Honestly I already expected for this kind of answer. I keep on debugging the
code using DUMA. Thanks alot for the swift response!
Original-Nachricht
> Datum: Thu, 27 Oct 2011 10:42:37 +
> Von: "Black, Michael (IS)" <michael.bla...@ngc.
Me thinkst you're corrupting your stack or memory.
I'd be willing to bet big money that this is your program causing this as there
are 1000's of people running that exact same call without any problem at all
(like me and I've been using it like crazy across multiple versions of SQLite)
If
qlite-users-boun...@sqlite.org] on
behalf of Bo Peng [ben@gmail.com]
Sent: Sunday, October 23, 2011 8:47 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] EXT :Re: Concurrent readonly access to a large database.
On Sun, Oct 23, 2011 at 8:12 AM, Black, Michael (IS)
<mic
#1 What's the size of your database?
#2 What's your cache_size setting?
#3 How are you loading the data? Are your table inserts interleaved or by
table? Your best bet would be by interleaving during insert so cache hits
would be better.
Looks to me like you're getting disk thrashing in
See if this satisifies your needs...a complete example showing parameterized
statements fixing the problem...
http://codesnippets.joyent.com/posts/show/2384
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman
Nope -- didn't note the insert speed on that test.
Why don't you take my benchmark data and test it yourself? Then post the
results.
The saying "your mileage may vary" comes to mind...
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions
I recently benchmarked this...FTS4 has a prefix option that can make it
slightly faster than TEXT. Other than that it's about the same speed.
http://www.mail-archive.com/sqlite-users@sqlite.org/msg64591.html
The older part of the thread has the benchmark data
Michael D. Black
Senior
Information Systems
From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on
behalf of Igor Tandetnik [itandet...@mvps.org]
Sent: Monday, October 17, 2011 10:06 AM
To: sqlite-users@sqlite.org
Subject: EXT :Re: [sqlite] "is not null" and index
On 10/17/2011 9:30 AM, Blac
According to this benchmark the break-even point is at 40% nulls. I asssume
you have a different test?
#include
int main()
{
int i;
char sql[4096];
printf("CREATE TABLE x ('col1','col2','col3');\n");
printf("BEGIN;");
for(i=0;i<100;++i) {
if (i < 10) {
Does this make sense to try?
First, duplicate the lack of index
sqlite> explain query plan select * from x where col1 is null;
sele order from deta
-
0 0 0 SEARCH TABLE x USING INDEX col1index (col1=?) (~10
rows)
sqlite> explain
That's because today is Saturday. So 'Weekday 6' is Saturday which is the same
as 'now' - 7 days. No date advance is done.
sqlite> select date('now','-7 days','Weekday 0');
2011-10-09
sqlite> select date('now','-7 days','Weekday 1');
2011-10-10
sqlite> select date('now','-7 days','Weekday 2');
anov [paiva...@gmail.com]
Sent: Thursday, October 13, 2011 9:45 AM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] pragma PAGE_COUNT != pragma page_count
FYI: http://www.sqlite.org/src/info/150592b4b4.
Pavel
On Thu, Oct 13, 2011 at 10:34 AM, Black, Michael (IS)
<mich
] on
behalf of Black, Michael (IS) [michael.bla...@ngc.com]
Sent: Thursday, October 13, 2011 9:30 AM
To: marshall.cl...@parashift.com; General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] pragma PAGE_COUNT != pragma page_count
Easy fix me thinkst...this section was only check for lower
Easy fix me thinkst...this section was only check for lower-case 'p' --
otherwise returning MaxPgCnt.
so pAGECOUNT works OK. Just add the tolower()...
if( sqlite3StrICmp(zLeft,"page_count")==0
|| sqlite3StrICmp(zLeft,"max_page_count")==0
){
int iReg;
if(
What about storing the rowid's of the offsets in a separate table and using
that?
How dynamic is your data?
Michael D. Black
Senior Scientist
NG Information Systems
Advanced Analytics Directorate
From: sqlite-users-boun...@sqlite.org
To answer your question of which is fastersee the benchmark below...there's
no difference at 100,000 records. The index creation is a bit faster for
integer.
But for your data you won't be doing many inserts or updates on items...more on
prices so the grocery_type_index won't get touched
-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on
behalf of Petite Abeille [petite.abei...@gmail.com]
Sent: Sunday, October 09, 2011 3:58 PM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] Can pre-sorted data help?
On Oct 9, 2011, at 10:46 PM, Black, Michael (IS) wrote:
&
s Directorate
From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on
behalf of Petite Abeille [petite.abei...@gmail.com]
Sent: Sunday, October 09, 2011 10:20 AM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] Can pre-sorted data help?
On Oct 9, 2011, at
-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on
behalf of Petite Abeille [petite.abei...@gmail.com]
Sent: Sunday, October 09, 2011 9:08 AM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] Can pre-sorted data help?
On Oct 9, 2011, at 1:03 PM, Black, Michael
For your example create a separate table with just the first letter and build
an index on it.
create table text(t string);
create table first(textid int, first_char char);
create trigger makefirst after insert on text
begin
insert into first values(new.rowid,substr(new.t,1,1));
end;
insert into
Changing the 2 "15g" entries in sqlite3.c to "16g" corrects this problem. 15
digits is all that is guaranteed but the vast majority of 16-digit values are
representable.
Is this a valid solution? Or are there other side effects?
Before change:
sqlite> create table t (a float);
sqlite> insert
I would also like to know:
#1 How long does it take if you remove the transaction? (in other words is it
really working?)
#2 What does your TABLE look like?
#2 What does your INSERT look like?
Michael D. Black
Senior Scientist
NG Information Systems
Advanced Analytics Directorate
You need to be aware of the DLL search paths...can be quite confusing...
http://msdn.microsoft.com/en-us/library/windows/desktop/ms682586(v=vs.85).aspx#related_topics
Process explorer should help ensure you're running what you think you are
http://support.microsoft.com/kb/970920
Michael
for full text search.
On Sep 28, 2011, at 4:35 PM, Puneet Kishor wrote:
>
> On Sep 28, 2011, at 4:18 PM, Black, Michael (IS) wrote:
>
>> I have no idea if this would work...but...here's some more thoughts...
>>
>>
>>
>> #1 How long does this take:
>
Subject: EXT :Re: [sqlite] speeding up FTS4
On Sep 28, 2011, at 2:41 PM, Black, Michael (IS) wrote:
> What happens if you create an index on uris(feed_history_id)
>
>
>
Yeah, I noticed that lacking as well.
sqlite> EXPLAIN QUERY PLAN SELECT u.uri_id
...> FROM projects p
.
[punk.k...@gmail.com]
Sent: Wednesday, September 28, 2011 2:00 PM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] speeding up FTS4
On Sep 28, 2011, at 1:14 PM, Black, Michael (IS) wrote:
> strftime returns a text representation. So you didn't really change anything.
>
ing up FTS4
On 09/28/11 20:14, Black, Michael (IS) wrote:
> strftime returns a text representation. So you didn't really change anything.
>
> You need to use juliandays() as I said.
>
>
> And you want a REAL number...not integer...though SQLite doesn't really care
> what
...@gmail.com]
Sent: Wednesday, September 28, 2011 12:44 PM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] speeding up FTS4
On Sep 28, 2011, at 11:00 AM, Black, Michael (IS) wrote:
> Your change to numeric date/time may not take a long as you think.
>
>
>
Took an hou
Your change to numeric date/time may not take a long as you think.
drop any indexes on project_start and downloaded_on;
update projects set project_start=julianday(project_start);
update uris set downloaded_on=julianday(downloaded_on);
Recreate indexes.
Modify your code to insert
ay, September 28, 2011 9:41 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] EXT : speeding up FTS4
On Sep 28, 2011, at 8:02 AM, Black, Michael (IS) wrote:
> Have you done "ANALYZE"? That might help.
>
> Also...try to arrange your joins based on record count (
P.S. Your projects table is missing project_start. So apparently these aren't
the real create statements you are using.
Michael D. Black
Senior Scientist
NG Information Systems
Advanced Analytics Directorate
From: sqlite-users-boun...@sqlite.org
Have you done "ANALYZE"? That might help.
Also...try to arrange your joins based on record count (both high-to-low and
low-to-high) and see what difference it makes.
Since you have only one WHERE clause I'm guessing having project_ids as the
first join makes sense.
Michael D. Black
Senior
I love C myself...this does what you want I think. Only has 3 processes ever
run.
And since you're not worried about SQL errors apparently no need to use the
sqlite library.
A couple of changes to match your iostat output is all that's needed.
I assume you know C (a rather large assumption I
Richard almost got it. According to this link JFFS doesn't support
MMAP_SHARED. Can another flag be used?
http://lists.busybox.net/pipermail/uclibc/2006-November/016838.html
Michael D. Black
Senior Scientist
NG Information Systems
Advanced Analytics Directorate
From:
I found an old post here that claims jamvm fixed their same (or similar?)
assertion problem with that jdbc driver.
https://evolvis.org/pipermail/jalimo-info/2009-March/000299.html
Michael D. Black
Senior Scientist
NG Information Systems
Advanced Analytics Directorate
[sqlite]答复: 答复: Is SQLite supporting x64?
Thanks for your apply, Michael, I'll keep that in mind.
BTW, I compile the source as a separate DLL for modularity, thanks for your
kind advice again!
-邮件原件-
发件人: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-bounces@sqlite.
org] 代表 Blac
You can't call 32-bit code from 64-bit code or vice versa. That's not
SQLite...that's any software.
So if you were to build a 64-bit DLL, distribute your application, and your
user then installed a 32-bit DLL things could/would break.
That's why many of us recommend compiling sqlite into your
Google Chrome creates those on my system (Win XP64) in "Documents and
Setting\username\Local Settings\Temp
Are you using Chrome? A polite shutdown of Chrome deletes it's current file.
A rude shutdown will leave it there.
It's not an sqlite bug or virusit's an application doing it.
Me thinkst the database can't open the WAL file.
I don't see your script in the attachments but where is your database being
opened?
Michael D. Black
Senior Scientist
NG Information Systems
Advanced Analytics Directorate
From: sqlite-users-boun...@sqlite.org
May I suggest you print out the SQL that you are building in your script for
every statement? I assume you can log it or display it to screen somehow? Then
you'll see what your problem is and can try and execute those statements in the
shell...plus you can show us.
And your error checking is
: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] splitting a line to produce several lines?
On 12 sept. 2011, at 13:26, Black, Michael (IS) wrote:
Since SQL is designed to return rows I believe the answer is "no" since you're
data is not stored in rows.
I suspe
Since SQL is designed to return rows I believe the answer is "no" since you're
data is not stored in rows.
You need to do what's referred to as "normalizing" your data.
If you normalize the answer becomes a natural query.
create table kind (kind_id int primary key, name text);
insert into kind
I sincerely doubt that sqlite is your problem as everybody else would be seeing
the same problem.
What is the prfmlt() function? I would suspect whatever is interpreting your
output stream is the culprit.
I've seen historically where a period can mean end-of-line.
Michael D. Black
You need to show us exactly what you're doingit's not clear
reboot (please wait for disk to settle after login).
sqlite3 dba
.timer on
select count(id) from tab1; -- database not cached in OS or in sqlite3
select count(id) from tab1; -- this will be faster as the database is cached
ssible to distinguish sources. Or reject the logging of statement
with a trigger similar to the one you proposed..
Greetings,
Frans
On 2011-09-02 16:51, Black, Michael (IS) wrote:
> Maybe I don't understand your setup completely...but can't you have your
> applications send a string id
of
identifier of the program or process that has executed each SQL statement?
Regards,
Frans
On 2011-09-02 12:58, Black, Michael (IS) wrote:
> If you can add a field that you can put a source string in you can do this:
>
> create table dml (dmlstuff text, source text);
> create tr
] on
behalf of Black, Michael (IS) [michael.bla...@ngc.com]
Sent: Friday, September 02, 2011 8:00 AM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] sqlite3_open_v2 performance degrades as number of
opens increase
I assume you've overridden the system default for 1024 files
I assume you've overridden the system default for 1024 files in ulimit for # of
open files?
I don't see the times you're seeing using this program...though my databases
are empty which probably makes a difference.
I do see the gradual increase in time...I think this is almost all due to the
OS
If you can add a field that you can put a source string in you can do this:
create table dml (dmlstuff text, source text);
create trigger before insert on dml
for each row when new.source not like 'p2p'
begin
select raise(rollback,'Not p2p source');
end;
sqlite> insert into dml
I'm guessing you want "&(user.getPhoto()[0])" or just "user.getPhoto()"
A pointer...not the first value of your photo.
Michael D. Black
Senior Scientist
NG Information Systems
Advanced Analytics Directorate
From: sqlite-users-boun...@sqlite.org
sqlite> create table questions (answer text);
sqlite> insert into questions values('/FAQ/Doctors');
sqlite> select * from questions;
/FAQ/Doctors
sqlite> select
ltrim(ltrim(ltrim(answer,'/'),'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'),'/')
from questions;
Doctors
You need to add
06:34 PM, Black, Michael (IS) wrote:
> Doohyes "we" missed that. But shouldn't new.rowid be undefined then
> rather than return -1? Much like old.rowid is undefined? That might have
> helped "us" in recognizing "our" mistake.
Fair enough. Sounded pomp
Just download the amalgamation and include sqlite3.c and sqlite3.h in your
project.
Much easier than trying to mess with shared libraries which you probably don't
need anyways.
That would be the zip file on here:
http://www.sqlite.org/download.html
Michael D. Black
Senior Scientist
tion Systems
Advanced Analytics Directorate
From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on
behalf of Dan Kennedy [danielk1...@gmail.com]
Sent: Wednesday, August 31, 2011 1:19 AM
To: sqlite-users@sqlite.org
Subject: EXT :Re: [sqlite] Clarification about Triggers
: Tuesday, August 30, 2011 9:42 AM
To: Black, Michael (IS)
Subject: EXT :Re: [sqlite] Clarification about Triggers
I did exactly what you have suggested but it does not work properly with my
software.
It increments my id (i replaced rownum with id, the function still is the
same), but the value
NFS is not a good idea as you have discovered.
http://www.sqlite.org/faq.html#q5
Here's what I'd do for starters. Have your grid processes write their SQL
statements (or data) to a flat file...one file for each grid member.
Then have a process that reads all those files using pipes like this,
There may be a more elegant way but this works:
create table temp_01(rownum integer primary key,val float);
create table temp_02(rownum integer primary key,val float);
create table total(rownum integer primary key,val float);
create trigger after insert on temp_01
begin
insert into total
What happens if you make it an in-memory database? If that works that will
help narrow the problem to the MMC.
And can you run it on your development machine too and see what happens?
And I think we asked before but can you make a small sample program that causes
this for you?
Michael
o? How bad in performance is it?
Black, Michael (IS) wrote:
>
> What you're saying makes sense. But you haven't stated a problem...
>
>
>
> Are you far enough along you can show timing beween 1st and 2nd queue
> fills?
>
>
>
> How long does it take you to insert your f
And...if you don't use ID at all you can get rid of it.
CREATE TABLE mystuff (TimeStamp INTEGER PRIMARY KEY,Data1 FLOAT, ...)
TimeStamp will be an alias for rowid.
http://www.sqlite.org/autoinc.html
That will get rid of one index and one field which will save you at least 16MB
of
What you're saying makes sense. But you haven't stated a problem...
Are you far enough along you can show timing beween 1st and 2nd queue fills?
How long does it take you to insert your first million?
How long does it take you to insert your second million?
Michael D. Black
Senior
I'd like to hear what you're doing and why you think SQLite is the way to do
it. And what are your speed requirements?
You are apparently worried about speed but never tested to see if SQLite was
fast enough. You could've tested it yourself in a matter of an hour or so. I
imagine an update
Dont' know if this is related but are you keeping the database open all the
time or closing and reopening?
If reopening does this only occur after opening again?
Michael D. Black
Senior Scientist
NG Information Systems
Advanced Analytics Directorate
t (sorry for cut from my code...):
sprintf(zSql, "INSERT INTO Journal VALUES(%i, %i, %i, '%s', '%s', '%s')",
nv.dgfe_db_pntr->triad.closure_num+1, nv.dgfe_db_pntr->triad.ticket_num,
nv.dgfe_db_pntr->triad.item_num, nv.dgfe_db_pntr->date,
nv.dgfe_db_pntr->time, description);
Rg
on? Or How can protect my DB against this
kind of corruption?
Thanks for any help
Alessandro
From:
"Black, Michael (IS)" <michael.bla...@ngc.com>
To:
General Discussion of SQLite Database <sqlite-users@sqlite.org>
Date:
23/08/2011 14.10
Subject:
Re: [sqlite] Autoincrement f
And at least show us the code where you're doing your insert...my money says
you're doing it wrong.
Michael D. Black
Senior Scientist
NG Information Systems
Advanced Analytics Directorate
From: sqlite-users-boun...@sqlite.org
301 - 400 of 844 matches
Mail list logo