It's a problem about MySQL.
And could you tell how many rows you did query?

On Tuesday, December 9, 2014 10:49:04 AM UTC+8, Ziyu Li wrote:
>
> I have a sql select query which takes about 20 seconds, I want to use 
> mysql cache to cache result so I can quickly get results.
>
> After doing some configuration in my.cnf, I succeed achieving this when 
> run select query in Linux mysql client console.
>
> the added lines in my.cnf is:
>
>  query_cache_size = 268435456
>  query_cache_type = 1
>  query_cache_limit = 1048576
>
> But when I run the query from web.py code. The cache function seems not 
> working, that is, the execution time is not shorter than before.
>
> Below is the web.py code:
>
> import web      
> db = web.database(dbn='mysql', db='RLCM', user='guest', pw='guest')   
> sql = "SELECT xxx from xx"   
> results = db.query(sql);
>
> Do I need to add any parameters to enable cache?
>

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/webpy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to