in reply to Re^5: Threads and DBD::SQLite?
in thread Threads and DBD::SQLite?
Very interesting: I find that, with threads, postgres is not even so much slower. Like you, I am a bit suspicious of the results, but I see no faults in the code.
(All this is with fsync = off (in postgresql.conf), but that (as expected) only seems to influence the writing, not the reading)
So, comparison is again between a SQLite memory table, and a postgresql normal table.
UPDATE I believe there is an oversight in the threading block. ISTM that it doesn't retrieve enough. But I have to admit that I do not quite understand it at the moment. And I'll have to leave it at that for now (bedtime), more later, I hope...
SQLite - 5.96526885 s Populate db with 100000 records SQLite - 0.14969087 s Create primary index SQLite - 0.54066706 s Retrieve the whole lot SQLite - 0.06327486 s Read all 100000 records using 2 threads SQLite - 6.06698895 s Populate db with 100000 records SQLite - 0.14992595 s Create primary index SQLite - 0.53164196 s Retrieve the whole lot SQLite - 0.12085700 s Read all 100000 records using 4 threads SQLite - 6.14582801 s Populate db with 100000 records SQLite - 0.15506721 s Create primary index SQLite - 0.55244803 s Retrieve the whole lot SQLite - 0.17814016 s Read all 100000 records using 8 threads Pg - 29.35742998 s Populate db with 100000 records Pg - 0.53696704 s Create primary index Pg - 13.75696707 s Retrieve the whole lot Pg - 0.14590406 s Read all 100000 records using 2 threads Pg - 22.90790606 s Populate db with 100000 records Pg - 0.56523991 s Create primary index Pg - 13.84565902 s Retrieve the whole lot Pg - 0.13429594 s Read all 100000 records using 4 threads Pg - 19.43180919 s Populate db with 100000 records Pg - 0.53746796 s Create primary index Pg - 13.00171399 s Retrieve the whole lot Pg - 0.19895601 s Read all 100000 records using 8 threads
(This is PostgreSQL 9.4devel, btw)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^7: Threads and DBD::SQLite?
by BrowserUk (Patriarch) on Dec 17, 2013 at 08:35 UTC | |
Re^7: Threads and DBD::SQLite?
by BrowserUk (Patriarch) on Dec 17, 2013 at 06:40 UTC | |
by erix (Prior) on Dec 17, 2013 at 08:37 UTC | |
by BrowserUk (Patriarch) on Dec 17, 2013 at 08:54 UTC |