> >> het volgende geschreven:
> >>> I included 5 databases that we used for testing in this link:
> http://wikisend.com/download/570088/test_databases.zip
> >>>
> >>> The query performed on these databases is:
> >>> delete from A where id=1;
> >>
> >> I could not resist trying this but the tables in the databases
> >> appear all empty and I get neglectible timings. Do I need to run an
> >> insert script first?
> >
> > No, it is all about preparing, so there is no need to insert data.
> > When we perform the query "delete from A where id=1;"  on the
> > databases from the zip file, we get the following timings:
> >
> > 500 tables - 10 msec in total
> > 1000 tables - 25 msec in total
> > 5000 tables - 298 msec in total
> > 10000 tables - 985 msec in total
> >
> > What we would indeed expect is to have neglectible timings. Perhaps
> > our interpretation of neglectible differs? Could you please tell me
> > what your timing is on the 10000 tables database?
> >
> > We used the .timer ON command in the SQLite command shell utility as
> > well as timing from our own application that has SQLite integrated.

The vdbe program is 20 times larger for 10000 tables versus 500 tables (400K 
instructions for the later -vs- 20K for the former), and this appears to be 
where the time is spent -- generating all the foreign key checking and trigger 
code.  Perhaps the memory allocator has issues when building such a huge vdbe 
set (I haven't looked at the code, but is it perchance doing a lot of realloc's 
as more triggers are added?)




_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to