[sqlite] about B+Tree depth

2009-02-11 Thread yoky
Hi all, I want to know the depth of B+Tree in Sqlite, is there some way to compute it? suppose I konw the page size, table size, and entry nums. The B Tree depth determine the page number Sqlite has to get in a B Tree search, is right? Thanks!

[sqlite] About Alter table add column

2009-02-04 Thread yoky
Hi all, I have a question about alter table. for example, I create a table person(ID integer primary key, name text, addr text), Then I want to upgrade the table and add some columns, "alter table person add age integer", I want to know the changed table structure will have a big effect on the

[sqlite] About Sqlite cache metch times and read() call times

2009-01-20 Thread yoky
Hi all, I add some debug information in sqlite3.c, and test Sqlite cache metch times, unmetch times and read() called times in Linux, I found that page unmetch times in cache is bigger than read() called times. Then I found in Btree.c getAndInitPage() function called sqlite3PageLookup,

[sqlite] About Sqlite cache

2008-12-22 Thread yoky
cache? 2. Cache was malloced in a transaction, and was freed at the end of a transaction, is right? 3. Please intrduce the implement of cache mechanism in Sqlite. Thanks very much! Yoky ___ sqlite-users mailing list sqlite-users@sqlite.org http

[sqlite] About "select * from table ....." with Sqlite

2008-11-19 Thread yoky
Hi all, I create a table with 200 columns, then use sqlite3_prepare() and sqlite3_step()to get a record by this: "select * from tbl where ID =.. ". Test in my embedded system,The total time is about 65ms,it is too long for the performance requirement, I found sqlite3_prepare() time is about

[sqlite] About "select * from table....." by Sqlite

2008-11-18 Thread yoky
Hi all, I create a table with 200 columns, then use sqlite3_prepare() and sqlite3_step() to get a record by this: "select * from tbl where ID =.. ". Test in my embedded system The total time is about 65ms,it is too long for the performance requirement, I found

Re: [sqlite] About sqlite3_bind

2008-11-11 Thread yoky
A parameter represents a literal. You can't bind a column name. After binding, your query is equivalent to select 'ID','age','name' from tbl1 where ID=1; > The return value of sqlite3_step(stat) was SQLITE_ROW, but the > values I got were 0, > why? Because the value of the column is a

[sqlite] About sqlite3_bind

2008-11-10 Thread yoky
some other ways to reduce the time of parse SQL statement. Are therer some good advices? Thanks very much! yoky ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] About select by "=" condition to a string

2008-10-31 Thread yoky
); binding a blob and specifying a length of *two* and still can not select the record I want by " select * from tbl1 where name ='aa' ", I think maybe I should use: sqlite3_bind_text( ), because this column type is a string. I will try last week! yoky ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] About select by "=" condition to a string

2008-10-31 Thread yoky
te3_prepare(db, "select * from tbl1 where name like 'aa' ", -1, , 0);sqlite3_step(stat); I can get the record. Why? and How can I select record by "=" condition to a string? Thanks! yoky ___ sqlite-

[sqlite] About select records from table

2008-10-29 Thread yoky
Hi all, I create a table with 250 columns and this table has 3 records, I want to select the records from the table which satisfy certain conditions. the SQL statement like this: select * from tablename where (conditions); Then use sqlite3_get_table() function to get the

[sqlite] about sqlite3_prepare()

2008-10-23 Thread yoky
lite3_exec() in 63534 line it works normally. Thanks yoky ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users