Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^7: Threads and DBD::SQLite?

by BrowserUk (Patriarch)
on Dec 17, 2013 at 06:40 UTC ( [id://1067423]=note: print w/replies, xml ) Need Help??


in reply to Re^6: Threads and DBD::SQLite?
in thread Threads and DBD::SQLite?

Thanks again erix. Those are some intriguing numbers.

ISTM that it doesn't retrieve enough.

Have you seen/disabled this from the posted code?:

$Q->nq( $_ ) for (shuffle 1 .. $N)[ 0 .. $R ]; #.....................................^^^^^^^^^^^

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^8: Threads and DBD::SQLite?
by erix (Prior) on Dec 17, 2013 at 08:37 UTC

    OK, so my numbers for "Read all 100000 records using 4 threads" were really

    " Read ", $R * 100 / $N, " % of all records using 4 threads"

    that means the test was doing 0.1 % of what the output-line was saying.

    Here is a run without that mistake:

    # The offending code line changed to: # $Q->nq( $_ ) for (shuffle 1 .. $N); SQLite - 5.90120077 s - Populate db with 100000 rows SQLite - 0.15266800 s - Create primary index SQLite - 0.53022408 s - Read all 100000 rows, unthreaded SQLite - 7.23427510 s - Read all 100000 rows, 4 threads Pg - 23.40106297 s - Populate db with 100000 rows Pg - 0.53076911 s - Create primary index Pg - 13.71553111 s - Read all 100000 rows, unthreaded Pg - 7.40499115 s - Read all 100000 rows, 4 threads

      so my numbers

      Not only your numbers, mine also. Another forgotten artifact from when I was testing this a couple of months ago.

      Your latest output makes for intriguing reading. The Pg 1 thread versus 4 threads is sort of what you'd expect.

      The sqlite numbers make no sense at all. It looks like it has to re-build the cache from scratch for the new connections?

      Those kind of numbers combined with my inability to get a memorydb combined with shared db via multiple connections tell me that this stuff isn't ready for prime time yet.

      Thanks for your help.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1067423]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2025-03-26 21:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When you first encountered Perl, which feature amazed you the most?










    Results (68 votes). Check out past polls.

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.