I'm noticing that the length of table names affects performance during
creation of those tables. Attached is a code example that reproduces
the problem.
To compile the example:
gcc main.c sqlite3.c -O3 -DLONG_NAMES -DNDEBUG
gcc main.c sqlite3.c -O3 -DNDEBUG
On my machine, when using relatively short table names like
`TABLE_{table #}`, creation of a database with 10,000 tables takes
approximately 14 seconds. These table names vary from 7 to a max of 11
characters.
When using relatively long table names like `TABLE_{table #}_{some
unique identifying name that adds 120 or so characters}`, creation of
a database with 10,000 tables takes approximately 60 seconds.
Creating the database with long table names took over 4 times longer!
Why is this the case? Is this expected behavior or a bug?
And since creating tables with long names negatively affects
performance, this leads me to wonder if query performance on such a
database would also be negatively affected.
Thoughts?
P.S.: I'm using the latest amalgamated version of sqlite (3.8). There
is also a Stack Overflow question covering this topic here:
http://stackoverflow.com/questions/18603123/table-name-length-in-sqlite-affects-performance-why
-Jared
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users