Problem with true=-1.
!false=1
So !false == true fails which can bite you in the behind unexpectedly
true= 1
!true=0
true=-1
!true=0
!false=1
(true= 1 == !false) = 1
(true=-1 == !false) = 0
#include
main()
{
int true1=1;
int true2=-1;
int false=0;
reibich [j...@kreibi.ch]
Sent: Wednesday, April 18, 2012 10:32 AM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] "DEFAULT BOOLEAN NOT NULL" not working with
entityframework
On Wed, Apr 18, 2012 at 01:20:59PM +0000, Black, Michael (IS) scratched on the
wall:
> default v
default values are during INSERT...not SELECT.
I suppose it's possible Maestro is messing it up.
You just need to do an "update mytable set IsReplaced=0 where IsReplaced is
null;"
You can do that from the shell.
Hopefully that makes your ADO happy.
If you want to test the shell then d
Have you checked your table afterwords to ensure you don't have any nulls in
IsReplaced?
select count(IsReplaced) from mytable where IsReplaced is null;
I tested and the alter table does fill with default values for me. At least
from the sqlite shell.
Does this work for you? Are you doin
You're talking PHP...not SQLite.
SQLite doesn't know about timezones other than "local" and "utc".
So your timezones will depend on your OS.
On RedHat it's in /usr/share/zoneinfo and there's tons of them. I've got 1,743
of them.
Michael D. Black
Senior Scientist
Advanced Analyti
Store them as float or do integer and multiple by a power of 10 to get as many
digits as you want.
So 1.234 seconds *10^3 can be 1234 integer
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems
rs-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
De la part de Black, Michael (IS)
Envoyé : jeudi 12 avril 2012 17:17
À : General Discussion of SQLite Database
Objet : Re: [sqlite] error compilation with Sqlite in C program
You're missing a step in your library build.
You're missing a step in your library build.
ranlib libsqlite.a
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems
From: sqlite-users-boun...@sqlite.org [sqlite-
I assume you are batching your inserts?
How many inserts/sec do you need to do to keep up?
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems
From: sqlite-users-boun
'origine-
De : sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
De la part de Black, Michael (IS)
Envoyé : mercredi 11 avril 2012 14:01
À : General Discussion of SQLite Database
Objet : Re: [sqlite] error compilation with sqlite amalgamation
You don't show how y
You don't show how you're compiling...but this is what you need to do.
gcc -o myprog myprog.c sqlite3.c -lthread -ldl
Your undefined reference are to the two libraries you need to link in to
resolve them.
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOIN
You want your assert to be this:
assert(stmt != NULL);
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems
From: sqlite-users-boun...@sqlite.org [sqlite-users-bou
Don't you need to load the sqlite3 library first for tclsh?
load ./libtclsqlite3.so Sqlite3
Or something like that?
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems
__
You need 2 inserts to do what you want. Hopefully the order in the table
doesn't matter to you.
sqlite> CREATE TABLE t2 (Col1 text,Col2 text);
sqlite> insert into t2 (Col1) values('xxx');
sqlite> insert into t2 values('yyy','def');
sqlite> select * from t2;
xxx|
yyy|def
sqlite>
sqlite>
sqlite>
Howeverthe DB file is portable across big/little endian and 32/64 bit.
So do your hash on the DB file and distribute that. Any reason you can't do
that?
http://www.sqlite.org/onefile.html
I guess SQLite uses the endianess of the database file over the architecture?
Michael D. Blac
Database files are purportedly platform independent. So why don't you
distribute the database file instead of building it?
Then your checksum would be fine.
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Informati
ite.org] on
behalf of Simon Slavin [slav...@bigfraud.org]
Sent: Saturday, March 31, 2012 7:50 AM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] about sqlite3_exec function
On 31 Mar 2012, at 12:48pm, "Black, Michael (IS)"
wrote:
> What you want is the system() functi
What you want is the system() function which will execute a shell command.
But you still need to add your own HTML around it to be displayed by a browser
as it's missing the "rest of the story".
system("echo >mm.html"); // first one creates mm.html
system("echo >>mm.html"); // 2nd and su
You'll need to export the table and data. Change the SQL to what you want.
Then import again.
Does the shell have ability to name the columns on the insert statements from
the .dump to make this easier? I don' t see anythinig offhand that seems to do
that.
Michael D. Black
Senior Sci
Don't see any problems here with valgrind.
Red Hat Enterprise Linux Server release 5.7 (Tikanga)
[sqlite-amalgamation-3071100]$ gcc -g -o shell shell.c sqlite3.c -ldl -lpthread
[sqlite-amalgamation-3071100]$ ./shell
SQLite version 3.7.11 2012-03-20 11:35:50
Enter ".help" for instructions
Ente
n pretty much expect. Would getting a server with 4 CPUs and 16GB (a
> > high-end home-version PC) - reasonably enable me to run 3-4 SQLite jobs
> > concurrently? In other words - no great speed improvement per job - but
> in
> > aggregate more work could get done?
> >
>
Cache is the primary (and obvious) thing I can think of.
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems
From: sqlite-users-boun...@sqlite.org [sqlite-users-boun..
sh start.
Tim
On 3/20/2012 10:26 AM, Black, Michael (IS) wrote:
> Try creating 2 tables, one for topics, one for definitions.
>
>
>
> Then insert all the topics at once followed by all the definitions.
>
> That should give you the same disk layout as two databa
Try creating 2 tables, one for topics, one for definitions.
Then insert all the topics at once followed by all the definitions.
That should give you the same disk layout as two databases.
And you don't say what "lengthy" means.
Michael D. Black
Senior Scientist
Advanced Analytics Direct
Put an absolute path name for your filename.
You're probably opening up the database in the wrong directory, creating an
empty DB, and thus "no such table".
In particular this happens when running from the IDE or via an Icon where the
working directory is not set.
Michael D. Black
Senior
at 11:45 AM, Black, Michael (IS) wrote:
> Looks like this should work...
>
No, it won't work. The memory has to be shared in common among all
connections to a particular database. If two separate processes connection
to the same database, they must get the same block of shared memory.
Looks like this should work...
>From http://www.cs.cf.ac.uk/Dave/C/node27.html
The following code fragment demonstrates a use of this to create a block of
scratch storage in a program, at an address that the system chooses.:
int fd;
caddr_t result;
if ((fd = open("/dev/zero", O_RDWR)) == -1
avies [simon.james.dav...@gmail.com]
Sent: Thursday, March 08, 2012 8:47 AM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] Efficient random sampling in a large table using
builtin functions.
On 8 March 2012 14:37, Black, Michael (IS) wrote:
> Glad to know thatcould that pos
] Efficient random sampling in a large table using
builtin functions.
On 8 March 2012 14:20, Black, Michael (IS) wrote:
> You don't say what language you are working in. IN C++ I would just declare
> a "set" and put random row numbers in it until I had enough. Then use that
&
You don't say what language you are working in. IN C++ I would just declare a
"set" and put random row numbers in it until I had enough. Then use that set
to build the SQL.
SQLite's random() doesn't have a seed function so you don't really get very
random numbers from run-to-run and have no
Hmmm...works for me...
On Windows:
SQLite version 3.7.9 2011-11-01 00:52:41
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> create table test(a text primary key);
sqlite> insert into test values('1');
sqlite> insert into test values('1');
Error: column a is not
I subtract 12 hours...so any time from 24:00:00 to 12:00:00 will work.
Time from noon to noon becomes midnight to midnight. Then you just add the 12
hours back in.
CREATE TABLE tijd(t int(11));
INSERT INTO "tijd" VALUES('2012-02-25 22:00:00');
INSERT INTO "tijd" VALUES('2012-02-27 01:00:00')
type dbscript.sql | sqlite3 test.db3 > dbscript.log 2>&1
And order is importantyou need to redirect to file first and then redirect
stderr to stdout as above.
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman
dump.bat
@del /q %~n1.csv
@if not exist %1 echo No such file: %1
@echo .separator "," >grocery.sql
@echo .output %~n1.csv >>grocery.sql
@echo select * from grocery; >>grocery.sql
@echo .quit >>grocery.sql
@sqlite3 %1 mailto:sqlite-users-boun...@sqlite.org] On Behal
Let's change them a touch...one too many @'s in loop.bat
loop.bat
@for %%i in (%1) do @call dump %%i
dump.bat
@echo .separator "," >grocery.sql
@echo .output %~n1.csv >>grocery.sql
@echo select * from grocery; >>grocery.sql
@echo .quit >>grocery.sql
@sqlite3 %1 grocery.sql
echo .output %~n1.csv
Is this from inside your application?
Works fine from the shell which makes me think you're truncating your value in
your program.
SQLite version 3.7.9 2011-11-01 00:52:41
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> CREATE TABLE IF NOT EXISTS Exports (id
>> test2.csv
Test3.db >> test3.csv
.separator ","
.output "orginal DB file name" + .csv
select * from grocery;
.quit
-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Black, Michael (IS)
Sent: Th
I think you may find you're running into buffer cache limits (not sqlite but OS
limits).
So the 1st third all fits into buffer cache. Once it starts committing to disk
things slow down a LOT.
Since you're not showing an real times it's hard to say you are any slower than
anybody else.
echo .separator "," >grocery.sql
echo .output %filename% >>grocery.sql
echo select * from grocery; >>grocery.sql
echo .quit >>grocery.sql
sqlite3 grocery.db http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
s
qlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Black, Michael (IS)
Sent: Wednesday, February 08, 2012 11:47 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] RE Connect As400/Iseries to SQLite .db
Do you have a C compiler on the AS400 you can use?
I co
d
is the file format.
-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Black, Michael (IS)
Sent: Wednesday, February 08, 2012 11:09 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] RE Connect As400/Iseries to SQLite .db
e3 to
run on an as400?
-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Black, Michael (IS)
Sent: Wednesday, February 08, 2012 10:46 AM
To: General Discussion of SQLite Database
Subject: [sqlite] RE Connect As400/Iseries to SQLite
Any reason you can't just .dump your SQLite database and import into db2?
Or do you need an ongoing connection?
There's a guy in this thread that connected his Linux system to AS400 using PHP
but the .dump/import would be a lot easier.
http://php.net/manual/en/function.odbc-connect.php
M
Hmmmcould .dump also have the ability to put out the column names for the
inserts?
That would solve this problem without having to write a special program to do
it yourself.
I suppose somebody might already have made a utility to do this?
Michael D. Black
Senior Scientist
Advanced
I think I found your problem.
Change
self.con.commit
To
self.con.commit()
In your Fupdate function
sqlite> .dump
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE abc800_111__FIRST
(pink varchar,
I don't know python for squatso this is what I get with your codewhat
do you expect?
./py
abc800_111__FIRST ## tablename sql_test 24
## locate sql_test 34
[] ## Rcount sql_test 69
['abc', '800 111 ', 'FIRST'] ## vRecordKey sql_test 97
[(u'1)No Row Name',)] ## divcolinfo
When you say "flash" and "JFFS" and "years" I think "life cycle". You may be
hitting the wall.
http://www.chuckstr89134.com/newsltrs/015.htm
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems
Non-standard ISO formatalready doable like this:
sqlite> select substr(strftime("%Y",'now'),3,2);
12
This will work until the year 10,000 :-)
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Sys
CREATE TABLE tblMainInventory(id,q);
INSERT INTO "tblMainInventory" VALUES(1,40);
INSERT INTO "tblMainInventory" VALUES(2,50);
CREATE TABLE tblSales(id,q);
INSERT INTO "tblSales" VALUES(1,30);
INSERT INTO "tblSales" VALUES(2,20);
CREATE TABLE tblReceives(id,q);
INSERT INTO "tblReceives" VALUES(1,20
o, no shell no fuser.
Shahar.
2012/1/29 Black, Michael (IS)
> Do you have shell access I hope?
>
>
>
> Check out "fuser" and see if you can find a process attached to it.
>
>
>
> Michael D. Black
>
> Senior Scientist
>
> Advanced Analytics Di
Do you have shell access I hope?
Check out "fuser" and see if you can find a process attached to it.
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems
From: sqlit
I don't think you want shell.c in your library. That has a "main" which will
conflict.
You don't need it anways.
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems
Without knowing what you're doing with the data or what your asbtract structure
is many will asssume that too many columns means not enough "normalization" of
your database.
It's not SQLite -- it's standard database design.
http://en.wikipedia.org/wiki/Database_normalization
You may be p
If you do a .dump of your table you will see that your 'true' and 'false' are
exactly that -- the strings (and not the boolean values). So yes, there's only
one row that has a value 0. The other rows have 1, 'true', and 'false'.
As the web page says, use 1 or 0 for true/false. It won't conv
Try this utility on both programs and find out what DLL they are actually going
for. And remember that if the DLL is already loaded it will use that.
http://www.dependencywalker.com/
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
version of
System.Data.SQLite.dll that is in the same directory as the executing
application. The only time it will not use this version is if you load
System.Data.SQLite.dll into the Global Assembly Cache which I do not
recommend.
On Tue, Jan 24, 2012 at 10:49 AM, Black, Michael (IS)
wrote:
> Y
Yes -- you do need to worry.
Plusyou apparently should rename the DLL so it doesn't collide with any
others from what I can discern from this:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms682586(v=vs.85).aspx
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
I'm confused as to why you would expect any match at all. And indeed, when I
run your queries against a test set I get nothing back at all for both queries.
Your datetime formats don't match at all. And "ORDER BY" for that field is not
date/time order since you have DD.MM. which won't re
Just add sqlite3.c to your compilation. You likely have no reason to use the
DLL.
This should work:
gcc -O -o test test.c sqlite3.c -ldl -lpthread
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Syst
You don't need to "register" the SQLite DLL. That's for ActiveX and COM DLLs.
Not ones that just export functions.
The search path stuff is a mess under Microsoft.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms682586(v=vs.85).aspx#standard_search_order_for_desktop_applications
Y
Read here on Mac OS X
http://sqlite.org/cvstrac/wiki?p=ReadLine
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems
From: sqlite-users-boun...@sqlite.org [sqlite-us
the problem with the shared lib stuff?
>>
>> Thanks!!
>> Black, Michael (IS) wrote, On 1/15/2012 2:27 PM:
>>> A simple one -- and please compile sqlite3.c into your program and make
>>> everybody happy.
>>>
>>> Forget the shared library stuff
You have to do all the binds together, THEN step. This works for me.
#include
#include
#include
#include "sqlite3.h"
int main()
{
sqlite3 *db;
sqlite3_stmt *stmt;
int status;
char *create = "create table
ONTTable(slotId,ponChannelId,onuType,onuId,adminStatus);";
char *query
You did 5 inserts and got 5 records. You need to do either just ONE insert or
ONE insert and FOUR updates.
I'd got for the one insert.
query = "insert into ONTTable (slotId,ponChannelId,onuType,onuId,adminStatus)
values (?1,?2,?3,?4,?5);";
then bind each parameter.
Michael D. Black
S
For this particular test cache_size didn't matter much...actually ran a touch
faster with smaller cache (although may be within the margin of error)
I dropped the cache_size to 125 pages (which matches the 16X increase in page
size that I did)
On SSD:
time sqlite3 gen.db
int
main ()
{
i
Mon, Jan 16, 2012 at 12:29 AM, Black, Michael (IS) <
michael.bla...@ngc.com> wrote:
>
> On SSD with 16384 page size and no WAL mode:
>
> time sqlite3 gen.db
> real4m4.816s ...
> Note: Database is only 595M with this page size. Much more efficient
> storage m
. Are you sure
your /tmp is actually using disk? It's the default in a lot of setups.
Best
Peter
> -Original Message-
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
> boun...@sqlite.org] On Behalf Of Black, Michael (IS)
> Sent: Sunday, January 15, 2012 1
I also ran without WAL mode (about 3X slower than WAL mode)
On SSD: (system spent a LOT of time in disk wait states)
time sqlite3 gen.db wrote:
>
> Fast. Fasty fast. Speed is high. INSERT, UPDATE, and DELETE all
> significantly faster. SELECT is a bit faster, but there's less difference.
>
A simple one -- and please compile sqlite3.c into your program and make
everybody happy.
Forget the shared library stuff as we have just been talking about.
CFLAGS=-O
OBJECTS=myapp.o sqlite3.o
LIBS=-lpthread -ldl
myapp: $(OBJECTS)
$(CC) -o $@ $(OBJECTS) $(LIBS)
Michael D. Black
Se
My point still standsyou can test the application compatibility by copying
the DLL into the app directory and changing the search order as I recommended.
Did you try that?
The applications really need to compile sqlite in their app. That's the good
fix here as has been pointed out (and
I ran your test on my SSD system with 1M inserts. I used WAL mode.
pragma journal_mode=WAL;
CREATE TABLE [TestTable] (
[Id] INTEGER PRIMARY KEY AUTOINCREMENT,
[Text] TEXT
);
begin;
insert.
end;
On SSD:
time sqlite3 gen.db wrote:
>
> Fast. Fasty fast. Speed is high. INSERT, UPDATE,
Come to thihk of it just add another field which is set to the "old" value
during the update.
Then both fields are available AFTER INSERT.
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems
___
What if you do a BEFORE INSERT and stick the values in a temporary table (use a
matching rowid).
Then you can just retrieve in in your AFTER trigger.
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Syste
Does REPLACE do what you want?
http://www.sqlite.org/lang_replace.html
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems
From: sqlite-users-boun...@sqlite.org [sqli
Can't you just copy the DLL into the application directory?
That just does what the app ought to do (if they don't already).
Then you might have to turn off safe DLL mode to find the correct DLL unless
you remove the system one.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms682586
Sure looks like cache to me. In your slow version you're walking thriugh the
entire table twice as opposed to interleaving.
You don't say how big your database is.
Increasing cache size may solve the problem.
pragma cache_size=2000 (default cache size in pages...1024 size pages means 2MB
Along with the sortprds code and database I sent out previously this now works.
gcc -g -o main main.c -DSQLITE_ENABLE_LOAD_EXTENSION sqlite3.c -lpthread -ldl
./main test.db "select id,sortprds(prdtype) from a order by sortprds(prdtype)"
ID = 2
sortprds(prdtype) = 3|10|15|27
ID =
Yup...putting the main in a separate file fixed it.
Thanks.
Or is there some other init function that can be called to maintain it in one
file?
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems
Your question made me want to do something I've been meaning to for a while...a
custom function.
So...the following words as loadable extension (at least for the shell)
gcc -g -shared -fPIC -o sortprds.sqlext sortprds.c
sqlite3 test.db
SQLite version 3.7.9 2011-11-01 00:52:41
Enter ".help
ation Systems
From: u okafor [uo07...@yahoo.com]
Sent: Monday, January 02, 2012 4:41 PM
To: sqlite-users@sqlite.org
Cc: Black, Michael (IS); d...@sqlite.org
Subject: EXT :Fw: [sqlite] Fw: A question on sqlite processing
Is that to say that the 'split on the source
, 2011 at 5:50 PM, Black, Michael (IS) wrote:
> So can we get a link on the download page for this?
>
There is a "Download" link on the lower menu bar. (ref:
http://www.sqlite.org/src/artifact/d9be87f1c340285a3?ln)
--
D. Richard Hipp
December 30, 2011 7:41 AM
To: General Discussion of SQLite Database
Cc: u okafor
Subject: EXT :Re: [sqlite] Fw: A question on sqlite processing
On Fri, Dec 30, 2011 at 8:17 AM, Black, Michael (IS) wrote:
>
> Nobody has done a split on the source file yet to make it < 64k.
>
S
This was just answered in another chain. Visual Studio has a 64k limit on
source code files for the debugger (thanks Microsoft...a 16-bit
limit?...really!).
If you need to step into it use WinDbg
http://msdn.microsoft.com/en-us/windows/hardware/gg463009
Nobody has done a split on the sour
l. So maybe there might be some syntax
> AN> elements in 3.7.9 (large comments or whatever) causing this
> AN> behaviour or there is really a maximum source file size that
> AN> VS2005 and 2008 syntax highlighter can support, which was reached
> between 3.7.7.1 and 3.7.9.
> AN&g
I duplicated your problem on C++ 2005 Express and C++ 2008 Express.
C++ 2010 Express does the syntax highlighting correctly (or at least a lot
better).
Can you upgrade?
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop G
Does this type of insert need a begin/commit around it? And would WAL mode
make any difference?
And try increasing your cache_size to at least the size of your database file.
cache_size is in pages so the default of 2000 is 2MB.
#pragma cache_size=20
That'll make it 200MB which is pro
I don't know if FTS or a normal table will matter here but just normalize the
whole thing.
CREATE VIRTUAL TABLE virfts4 using fts4(id,level,value);
Your level can be CO, ST, CI, VI. Or 1,2,3,4. 1,2,3,4 would be a touch faster.
INSERT INTO virfts4 VALUES(1,'CO','country1');
INSERT INTO vi
I"m not a UTF expert but codepage 437 seems to work fine for your example.
codepage 65001 is not "real" UTF-8 according to several google sources.
You do have to use Lucida font.
C:\chcp 437
Active code page: 437
C:\sqlite test.db
SQLite version 3.7.9 2011-11-01 00:52:41
Enter ".help" fo
You're probably seeing disk thrashing.
Try increasing your database cache size:
.pragma cache_size XX
It's in kilobytes. Try and make it as big as your database if you can. In
other words, cache the whole thing.
Secondly, you may want to try using the FTS3/FTS4 search capability if you
What does strlen() tell you on the XML before you put it in the table?
Can you boil all this down to one record in a table, and some code so we can
all see what's going on?
Do a .dump of the table and post the code.
See if you can reproduce it in a simple example.
Michael D. Black
Senio
Possible causes.
#1 You need indexes (quite possible) -- though it appears to me that all the
casting is going to kill using indexes.
#2 You need to increase cache (likely) -- try "pragam cache_size=200"
#3 You're hitting swap space (doubtful)
#4 You need to do this in your own code inst
Works for me
CREATE TABLE employee(name text,editby text);
CREATE TRIGGER update_editby AFTER INSERT ON employee
BEGIN
UPDATE employee SET editby = 'unknown' WHERE editby = '' AND rowid =
new.rowid;
END;
INSERT INTO employee VALUES('Ralph','');
SELECT * FROM employee:
Ralph|u
You need to surround your entire sqlite3 command with back tics.
TomaCampo=`sqlite3 /Users/.and RecordTy8pe='R';"`
That's how you execute a command in bourne shell.
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop
ested query in outer join
"Black, Michael (IS)"
writes:
> Natural joins are generally considered to be evil. Too many columns
> in common can be bad.
>
> If you just spell it out it works as expected
>
> sqlite> explain query plan select * from a left join b wh
Natural joins are generally considered to be evil. Too many columns in common
can be bad.
If you just spell it out it works as expected
sqlite> explain query plan select * from a left join b where a.id=1 and
b.id=a.id;
0|0|0|SEARCH TABLE a USING COVERING INDEX sqlite_autoindex_a_1 (id=?) (~1
I tested 3.7.9 on both Windows and Linux.
Both gave just "31|" as the output instead of "31|0" as you show.
And changing the select 9 made no difference...still got the same "31|"
answer for both.
I'm compiling with default options.
Michael D. Black
Senior Scientist
Advanced Anal
Your test_case.sql didn't come thru.
Can you report it in-ilne with an email?
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems
From: sqlite-users-boun...@sqlite.or
Do like a lot of us do and forget the DLL and just put sqlite3.c/h into your
project.
Then you can build and forget about it and it will always work in your project
(barring any future 32/64 incompatibilities). And you don't have to worry about
who's testing what bitset as it's completely sel
You're seeing on of my pet peeves...error messages like "cannot open file" or
Microsoft's famous "cannot load dll". Some of us need to know WHY.
So, change all your "cannot open" lines in shell.c to this:
fprintf(stderr, "Error: cannot open \"%s\":%s\n", zFile, strerror(errno));
Then you
fts3
tokenizer
hi,
On Sunday 04 December 2011 14:23:09 Black, Michael (IS) wrote:
> It says "here's token 'hal'" and if you return the pointer to "h" it points
> to the same place so it returns "hal" right back to youergo the loop.
I have read
201 - 300 of 863 matches
Mail list logo