[sqlite] about attach database

2015-12-16 Thread 王庆刚
hi,all There are two ways to open a database. 1.sqlite3_open 2.ATTACH DATABASE Because there are so many data base. So we used attach database to open them. But the efficiency of the programming is not ideal. which one is faster? Is the efficiency between the

[sqlite] about attach database

2015-12-15 Thread Richard Hipp
On 12/15/15, ??? <2004wqg2008 at 163.com> wrote: > hi,all > There are two ways to open a database. > 1.sqlite3_open > 2.ATTACH DATABASE > > Because there are so many data base. So we used attach database to open > them. > But the efficiency of the programming is not ideal.

[sqlite] about attach database

2015-12-16 Thread 王庆刚
I mean only compare the two ways of get the database handl. 1.sqlite3_open 2.ATTACH DATABASE Do not consider the next operation, such as select,update and so on. At 2015-12-16 10:51:31, "Richard Hipp" wrote: >On 12/15/15, ??? <2004wqg2008 at 163.com> wrote: >> hi,all >> There ar

[sqlite] about attach database

2015-12-15 Thread Richard Hipp
On 12/15/15, ??? <2004wqg2008 at 163.com> wrote: >I mean only compare the two ways of get the database handl. > 1.sqlite3_open > 2.ATTACH DATABASE I think they both do about the same amount of work. -- D. Richard Hipp drh at sqlite.org

[sqlite] about attach database

2015-12-16 Thread 王庆刚
After testing the Sqlite3_open and ATTACH DATABASE, I found that the attach database is slower than sqlite3_open. there is attachment after the mail which includ the speed information ( millisecond ). At 2015-12-16 10:59:27, "Richard Hipp" wrote: >On 12/15/15, ??? <200

[sqlite] about attach database

2015-12-15 Thread Jim Dodgen
You cannot attach to this list. If you can just paste into the body of the email or provide a link to the information *Jim Dodgen* On Tue, Dec 15, 2015 at 9:33 PM, ??? <2004wqg2008 at 163.com> wrote: > > After testing the Sqlite3_open and ATTACH DATABASE, > I found that the

[sqlite] about attach database

2015-12-16 Thread 王庆刚
After testing the Sqlite3_open and ATTACH DATABASE, I found that the attach database is slower than sqlite3_open. there is attachment after the mail which includ the speed information ( millisecond ).

[sqlite] about attach database

2015-12-16 Thread Dominique Pellé
??? <2004wqg2008 at 163.com> wrote: > > After testing the Sqlite3_open and ATTACH DATABASE, > I found that the attach database is slower than sqlite3_open. > there is attachment after the mail which includ the speed > information ( millisecond ). Your attachment w

[sqlite] about attach database

2015-12-16 Thread Scott Robison
On Tue, Dec 15, 2015 at 11:19 PM, Dominique Pell? wrote: > ??? <2004wqg2008 at 163.com> wrote: > > > > > After testing the Sqlite3_open and ATTACH DATABASE, > > I found that the attach database is slower than sqlite3_open. > > there is attachment after the mail which inclu

[sqlite] about attach database

2015-12-16 Thread Dominique Pellé
Scott Robison wrote: > On Tue, Dec 15, 2015 at 11:19 PM, Dominique Pell? gmail.com >> wrote: > >> ??? <2004wqg2008 at 163.com> wrote: >> >> > >> > After testing the Sqlite3_open and ATTACH DATABASE, >> > I found that the attach database is slower than sqlite3_open. >> > t

[sqlite] about attach database

2015-12-16 Thread Dan Kennedy
On 12/16/2015 12:51 PM, ??? wrote: > After testing the Sqlite3_open and ATTACH DATABASE, > I found that the attach database is slower than sqlite3_open. > there is attachment after the mail which includ the speed > information ( millisecond ). Hi, This mailing list str

[sqlite] about attach database

2015-12-16 Thread 王庆刚
Thanks for everyone. You are right. According to you help, I understand the problem. Just open or attach database , open operation is faster than attach database. if add a query statement after open or attach database. The time which they cost almost the same. Best regards. what Dominique sa

[sqlite] about attach database

2015-12-16 Thread Simon Slavin
On 16 Dec 2015, at 8:37am, Dominique Pell? wrote: > Having said all that, reading https://www.sqlite.org/c3ref/open.html > I see no mention of the fact that sqlite3_open*() is lazy. > Is it documented somewhere? Not in the official SQLite documentation. But it is easy to prove. Just open a d

[sqlite] about attach database

2015-12-16 Thread Scott Robison
On Wed, Dec 16, 2015 at 1:37 AM, Dominique Pell? wrote: > Scott Robison wrote: > > > Why would that be of benefit to you? Are you intending to attach a > database > > and never use it? It seems to me the same amount of time will be taken > > either way. > > > > When it comes to opening a databas