Opcodes near he bottom of the
documentation page http://www.sqlite.org/docs.html
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
and
effort.
That sounds a lot like RTFM only presented in a much more pleasant
manner. :-)
Anyway, it is good advice, and I second it.
Dennis Cote
P.S. I also think the quickstart page at the SQLite website should
probably be enhanced to show a basic version of a query using
ously prepared
queries. It also allows the user to modify some parts of a prepared
query using bound variables rather than recompiling the entire SQL query
from scratch. I thinks its usually worth the time it takes to learn how
t
low. I would suspect a problem with your memory
allocator which is being called by sqlite through the standard malloc
API. You should be able to see where this is happening by setting a
breakpoint on sqlite3FailedMalloc in util.c and looking back through the
call stack.
HTH
Dennis Cote
---
rows, your callback function
will be called 100 times.
After you get the sqlite3_exec version working, you should look at the
sqlite3_prepare, sqlite3_step, sqlite3_column_* set of APIs which are
newer and generally easier to use for querie
routines rather
than the older API's (sqlite3_get_table and sqlite3_exec) which are
intended primarily for backwards compatibility.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
yourself.
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
at one missing value in a 64 bit integer
space. However, it seems like somebody always notices these things
eventually. If I remember correctly it also shows up in the test suite.
Dennis Cote
-
To unsubscribe, send email to
pends on how you get the information,
and how you want to process and display it.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
SQL clearer
and safer (and due to statement caching in pysqlite it should also
perform faster).
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
cting the data for the columns you need,
and then reassembling only those columns into a new string of row data.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
recompilations of the same SQL statements.
It's not clear to me what you are trying to do in this loop but if you
can elaborate on your explanation, we may be able to suggest a much
faster way to accomplish your goal.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
they are not
located on overflow pages.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
180 lines isn't much harder than 2
with good tools
Jay,
I'm sure this is not what you intended, but I parsed your statement as:
the command line program that comes with sqlite WORKS.
If you need something that DOESN'T, do check out my program
You might want to polish up your marketing a little ;
to the variable parameters.
HTH
Dennis Cote
-
To unsubscribe, send email to [EMAIL PROTECTED]
-
Sandeep Suresh wrote:
Where is the conference ? Is it open for everyone to register ?
Further information is available here http://www.tcl.tk/community/tcl2006/
HTH
Dennis Cote
-
To unsubscribe, send email
troduced for
compatibility with other non-standard implementations in order to get
reliable error detection. Consequently, the SQL using these non-standard
quotes will not be portable to other standard conforming implementations.
The moral of this story is: stick to the standard unless you have a *VERY*
good reason to deviate.
Dennis Cote
On 7/28/06, Me <[EMAIL PROTECTED]> wrote:
Also - How do I get it listed in the wiki - ManagementTools?
It's a wiki...
Just go to the page click the edit link and add it yourself.
HTH
Dennis Cote
n this page
http://www.sqlite.org/capi3.html
HTH
Dennis Cote
ctions and returning values from these functions. You can view
the file here
http://www.sqlite.org/cvstrac/fileview?f=sqlite/src/func.c=1.132 or
download one of the source packages at http://www.sqlite.org/download.html.
HTH
Dennis Cote
of keywords at http://www.sqlite.org/lang_keywords.html
I would also suggest that you stick with the SQL standard method of
quoting identifiers using double quotes (rather than the other
extensions that SQLite accepts for compatibility with other non-standard
database systems).
HTH
Dennis Cote
of loneliness can be very frustrating. On the bright side, if
the problem isn't very repeatable, you shouldn't have to deal with the
consequences too often. :-)
Dennis Cote
can then use it to retrieve the record for
addition to your display list.
See section 2.3 User Defined function at
http://www.sqlite.org/capi3.html for additional information on creating
a user defined function.
HTH
Dennis Cote
Dennis Cote
to directly select the maximum value of the rowid
column, or the rowid of the last column in the table in rowid order
(which is the same thing). These queries will locate the last record in
O(log N) time using the rowid btree.
HTH
Dennis Cote
)? If it is doing what you say it is, it should be
easy to reproduce.
Dennis Cote
John Newby wrote:
Do you know of a way I could get the details from the listview?
John,
This question is far more likely to be answered on a Visual Basic
mailing list rather than this one.
HTH
Dennis Cote
the '
not the ") as a string delimiter?
Dennis Cote
a logical lock. As long as all your applications use
and respect your logical locks, then this scheme should work well.
HTH
Dennis Cote
IN
...> foo ON foo.id=bar.foo_id
...> ORDER BY
...> bar.something
...> ;
0|0|TABLE bar WITH INDEX bar_some
1|1|TABLE foo USING PRIMARY KEY
sqlite>
With the index on bar.something SQLite can scan the bar table in the
order required, and for each bar record it will use the primary key
index on the foo table to join the appropriate record from that table.
HTH
Dennis Cote
implementation should therefore
check for NULL and do nothing in this case.
I agree, this should be fixed. You should file a bug report.
Dennis Cote
, then no
memory was allocated, so there is no need to free it, however I believe
it should be safe to call the free routines with a NULL pointer.
HTH
Dennis Cote
in:
italy
Zambia
Iceland
I want my output to be:
Zambia
italy
Iceland.
Srikanth,
Add COLLATE NOCASE to the column definition of the country column in
your table.
CREATE TABLE name (
...
countrytext collate nocase,
...
);
HTH
Dennis Cote
ite> .explain off
sqlite>
sqlite> explain query plan SELECT
...> foo_id,
...> bar.id AS bar_id
...> FROM
...> bar
...> ORDER BY
...> bar.something
...> ;
0|0|TABLE bar WITH INDEX bar_someting
sqlite>
HTH
Dennis Cote
) -
date('now',%j) < 30)
Can someone pls help me?
Thanks a lot.
Try this:
SELECT * FROM date_details
WHERE abs(strftime(date_details.value,'%j') -
strftime('now','%j')) < 30
HTH
Dennis Cote
calling the function before your thread
has completed its copy.
Dennis Cote
ter.
HTH
Dennis Cote
osoft in Access. You should stick to the
standard double quote for better compatibility with other databases engines.
create table t (id integer primary key, "order" integer, "a long name"
text);
select "a long name", "order" from t;
HTH
Dennis Cote
.
Dennis Cote
database. I'm still a little surprised that a disk based database
is actually slightly faster than a memory based one, but that just means
that SQLite's memory based page I/O is less optimized than the OS's file
I/O libraries.
Dennis Cote
This will build the testfixture and then run the quick.test script.
It's not really anymore complicated once you have the required
environment setup.
Dennis Cote
Linus
himself uses the first style as demonstrated at
http://uranus.it.swin.edu.au/~jn/linux/saylinux.htm
Dennis Cote
it will close that user database (which closes
the attached common database as well). Your dbmail will only have one
attached database at any point in time, the common database.
Dennis Cote
.org/cvstrac/wiki?p=VirtualTables for the approach
that is being built into sqlite at this very moment.
Dennis Cote
ore detail? For example, it looks like IDC is, or
should be, the primary key for the ITM table, and that IDC is a
foreign key in the HVH table. Is that true? How many records in the
HVH table match each record in the ITM table; one, a few, or many?
What information do you need to get fr
t :limit offset :offset;
Then prior to each execution you can change the value bound to the
variables :start, :limit, and :offset (or just use the previous value if
it hasn't changed).
HTH
Dennis Cote
text collate nocase,
...
);
HTH
Dennis Cote
= 'C%' ORDER BY people LIMIT 20
select name from people where name >= 'C%' order by people limit 20
HTH
Dennis Cote
with out any problems. I don't doubt that
you have a problem, but you haven't given enough information for anyone
else to try to help you.
Dennis Cote
entry),
it needs to be used as an aggregate function over a table.
HTH
Dennis Cote
tion (simply write beyond the current
end of the file), but memory allocation might be slow for a particular
memory manager. Is this a :memory: or a file based database?
Dennis Cote
per second. I
suspect that with a transaction around your inserts you will also see an
insert rate around 3K records per second.
HTH
Dennis Cote
c variable
requirements should be fixed when your application is linked, and may
depend upon which features you have compiled in or omitted.
I think you will probably have to determine these values experimentally.
HTH
Dennis Cote
ery.
HTH
Dennis Cote
already been initialized and you can simply start using it.
HTH
Dennis Cote
rmance in a database
neutral way.
HTH
Dennis Cote
lemon.c:1165
#3 0x08049935 in FindStates (lemp=0xb7e0) at lemon.c:723
#4 0x0804b37e in main (argc=2, argv=0xb904) at lemon.c:1482
(gdb) quit
===
Michael,
You should report this bug at http://www.sqlite.org/cvstrac/tktnew so it
will be tracked and fixed.
Dennis Cote
c from t;
sqlite> select max(a) from t;
268435456
sqlite> insert into t select NULL, b, c from t;
SQL error: database or disk is full
sqlite> select max(a) from t;
268435456
sqlite> insert into t select NULL, b, c from t;
SQL error: database or disk is full
sqlite> select max(a) from t;
268435456
sqlite>
HTH
Dennis Cote
y function, also available in Windows XP SP1, modifies
the search path used to locate DLLs for the application and affects all
subsequent calls to the LoadLibrary and LoadLibraryEx functions by the
application.
Dennis Cote
"COMMIT;"
"DETACH DATABASE backup;";
sqlite3_exec(pMemoryDB, sql, NULL, NULL, NULL):
//
//continue working with memory database
//
}
HTH
Dennis Cote
omeone who comes up with an idea that everyone except
Richard likes.
Dennis Cote
oop to get the next result row.
HTH
Dennis Cote
been quite benevolent.
Dennis Cote
not be a burden for those
who only want to continue to read the list postings. If they don't reply
to this message they will be deleted from the distribution list. They
can always sign up again, or use one of the list archives instead.
Dennis Cote
an just go ahead and execute the insert. You will get an error
if you try to insert a record with a duplicate primary key. Catch the
error, generate a new random number and try again.
HTH
Dennis Cote
naged code and is able to step through the
sqlite3_prepare().
Are you saying you have built your own version of the SQLite DLL
compiled without NDEBUG set (i.e. a version with the asserts active)?
The DLLs available for download are all production builds with the
asserts disabled for maximum performance
QL still makes sense by
substituting a simple sum expression for your parameter. In your case,
the following does not make sense.
ALTER TABLE users ADD COLUMN 5+2 varchar;
HTH
Dennis Cote
.)
Try using the EXPLAIN QUERY PLAN SELECT... command instead. It will show
the order the tables are scanned and which indexes are being used.
HTH
Dennis Cote
you
open a database.
HTH
Dennis Cote
rithms instead of
sqlite. Then you will can go back to using binary file I/O. SQLite adds
overhead above and beyond binary file I/O, it will always be slower. If the
benefits of sqlite don't outweigh the costs, you should stick with binary
I/O. What benefit are you hoping to get out of using sqlite?
Dennis Cote
On 5/20/06, Dennis Cote <[EMAIL PROTECTED]> wrote:
Brandon,
...
Brannon,
I'm sorry I got your name wrong. I try to be careful about that, but I now
see your's slipped by me a couple of times.
Dennis Cote
c >= 200 and c <= 500;
If you want multiple columns you need to add multiple conditions like this:
select * from blah
where c >= 200 and c <= 500
or b >= 200 and b <= 500
Ifyou need more help, please try to say what you want to do more
specifically.Someone will be able to help you.
HTH
Dennis COte
etting at here. Copy memory from where to
where? The database is much more than an array of record structures that
you can copy data into.
Dennis Cote
there are any active
readers the writer can't get the exclusive lock.
You must close the reader (i.e. finalize or reset the select statement)
before the delete can be done.
HTH
Dennis Cote
bind_null() to insert a null value).
HTH
Dennis Cote
LECT b.c1, c2, c3 FROM a JOIN b USING(c1);
1|2|3
sqlite>
This should probably be fixed when your proposal is implemented.
Dennis Cote
the joined columns you would need to use a different
query.
Dennis Cote
. If these columns are to be edited, it would have to be
through a query on one table or the other.
Dennis Cote
on that feature.
HTH
Dennis Cote
saction to eliminate redundant disk I/O. The
other trick is to read the file directly (i.e. using fread) to load the
file into the OS cache when you first open the database. This will speed
up your queries.
HTH
Dennis Cote
mail makes it all seem
very hush hush. ;-)
I guess we will just have to wait and see.
Dennis Cote
faster depending upon the number of records
in T1 and T2. Try it out.
Both forms should be much faster if T1 and T2 have an index colC.
HTH
Dennis Cote
there for some time
while the I/O is done during the commit?
Dennis Cote
factor of about 3000 or 9000.
HTH
Dennis Cote
P.S. I apologize if Anish is not your first name, but I believe that
most people use the normal spoken order of their names for when setting
up an email account.
Prepared insert statements.
#include
#include
#include
#include "sqlite3.h"
l your own code can be very difficult.
The way you have worded the above it sounds like you are opening a
database connection for each transaction (as opposed to using a global
connection to execute each transaction). Is that true?
Which API function is returning the error?
Dennis Cote
per second, it seems to me that SQLite must be doing about 4
flushes per insert. Does that seem right to you Richard?
Dennis Cote
, but I would think that should be fairly
constant. I am re-testing with longer run times to check this.
Dennis Cote
Dennis Cote
proc sqlite_step {stmt N VALS COLS} {
upvar VALS vals
upvar COLS cols
set vals [list]
set cols [list]
set rc [sqlite3_step $stmt]
for {set i 0} {$i < [sqlite3_column_count $stmt]} {incr i} {
lappend cols [sqlite3_column_name $stmt
standard
library, fflush() seems to be ignored under WinXP because it does about
1M flushes per second. Hence the Win32 API version which produces the
results above.
Dennis Cote
#include
#include
#include
#ifdef WIN32
#include
int main(int argc, char *argv[])
{
int i, count
cords. The second uses the primary key index. The third
does a table scan because there is no index on column b. Finally the
fourth uses the new index on column b created just before. The last two
show how multiple table scans are listed for joins.
I'm not sure what the order and from columns are myself. Perhaps someone
else can explain them.
HTH
Dennis Cote
want to do is use sqlite3_prepare() to check if the
statement is syntactically valid. If it is you will get a success return
code, if not you will get an error return code.
I understand you are using TCL but I believe all these API functions are
exposed through the TCL API as well.
HTH
Dennis Cote
(FreeBSD vs WinXP) but I was wondering if you had any
special disk hardware that might account for some of this difference.
Are you using fast SCSI disks or perhaps a RAID array?
Dennis Cote
you post your table schemas?
You should probably file a bug report if this is confirmed.
I'm a little concerned now because I do very similar left joins of
multiple tables in my application. I haven't noticed a problem though.
HTH
Dennis Cote
yes 1M 23256
Dennis Cote
is equivalent to
SELECT count(TimeTracking.ROWID)
FROM TimeTracking
I suspect you really want something else.
HTH
Dennis Cote
by sqlite version 3 contains
several GOTO opcodes that simply jump around from the beginning to the
end and back again. I didn't think they would have a significant impact
on the execution time, but for simple commands this overhead may add up.
Dennis Cote
#include
#include
#include
#include
called sqlite3.lib.
lib /machine:i386 sqlite3.def
Now you need to add this library to your application project. I assume
you have included sqlite3.h into your application.
HTH
Dennis Cote
g an index on the
somehash field. Then SQLite could use the index to quickly locate the
correct record in your entries table. It will only scan the overflow
chain for queries that return the value of the binarydata field.
HTH
Dennis Cote
a subselect. It would be nice if this worked, but it doesn't.
select count(distinct p1)
from (explain insert into t(a,b) values(?3, :id))
where opcode = 'Variable';
You will have to do the same thing in your calling code.
HTH
Dennis Cote
to link
with your application.
HTH
Dennis Cote
801 - 900 of 1177 matches
Mail list logo