Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^4: learning memcached

by punkish (Priest)
on May 21, 2011 at 03:10 UTC ( #906026=note: print w/replies, xml ) Need Help??


in reply to Re^3: learning memcached
in thread learning memcached

> Another (insert better word here) "flaw" , is your sql query is too simple :) 
> The way I understand memcached, you get benefit if you cache data which is 
> expensive to calculate
I don't see why that should matter. Sure, on a more complicated and slow query, retrieving an already calculated result will be faster. However, retrieving even the simplest of results from memory should be faster than opening a file on disk, preparing a db handle, querying, and then returning the result. At worst, it should be about the same, not 30% worse!


when small people start casting long shadows, it is time to go to bed

Replies are listed 'Best First'.
Re^5: learning memcached
by Anonymous Monk on May 21, 2011 at 03:18 UTC
    However, retrieving even the simplest of results from memory should be faster than opening a file on disk, preparing a db handle, querying, and then returning the result.

    I don't think SQLite uses sockets. memcached does use socket. That might explain the difference, maybe benchmark against a database which uses sockets.

    Or maybe opening "foo.txt" is skewing the results (unlikely, but it could happen)

    At worst, it should be about the same, not 30% worse

    I literally don't know about that, you might wish to ask the mailing list (amusing story about that).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://906026]
help
Chatterbox?
[Corion]: ambrus: AnyEvent(::HTTP) doesn't integrate well with Prima, that's my main problem
[Corion]: There is a weirdo shim because there is a POE integration for Prima, and if you use that, you can use the POE adapter of AnyEvent. What I'd want is something transport agnostic that parses HTTP or produces HTTP output, so that the communication with ...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2016-12-07 15:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (130 votes). Check out past polls.