Re: [Maria-developers] query cache issue

2013-06-27 Thread Oleksandr Byelkin

26.06.2013 18:08, Roberto Spadim пишет:

Nice, in this case, should be nice implement a cache server, and mysql
servers will send cache to it? something like:

5 mysql clients (no cache here) < - >10 mysql servers (100mb of cache
each)  < - >2 cache servers (16gb of cache each)

we could use local cache + remote cache, for example, with this the local
cache will be very fast, and the remote cache will have a network delay
(but it's faster than disk i/o)

what you think?


I think it is irrelevant to query cache.

___
Mailing list: https://launchpad.net/~maria-developers
Post to : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-developers] query cache issue

2013-06-26 Thread Roberto Spadim
Nice, in this case, should be nice implement a cache server, and mysql
servers will send cache to it? something like:

5 mysql clients (no cache here) < - >10 mysql servers (100mb of cache
each)  < - >2 cache servers (16gb of cache each)

we could use local cache + remote cache, for example, with this the local
cache will be very fast, and the remote cache will have a network delay
(but it's faster than disk i/o)

what you think?
___
Mailing list: https://launchpad.net/~maria-developers
Post to : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-developers] query cache issue

2013-06-26 Thread Oleksandr Byelkin

25.06.2013 16:58, Roberto Spadim пишет:

it's a memory in client side with query_parameters (sql_mode, query text,
schema used, and others flags that change results) + query_results
example in php
$query_cache= array(
"sql_mode=12341234124124;SELECT * from query_Table" => array(
   "tables_used"=>array("query_Table"),
   0=>array('a'=>1,'b'=>2,'c'=>3),
   2=>array('a'=>1,'b'=>2,'c'=>3),
   3=>array('a'=>1,'b'=>2,'c'=>3),
   4=>array('a'=>1,'b'=>2,'c'=>3),
   )
);
$query_tables_checksum=array("query_Table"=>'some_checksum');
the query_table_checksum is the part of query cache to invalidade a query
at client side, it must be checked at each query execution (this can be
done in less time or near time of a cached query)

before get from client side cache, query the server about table changes, if
the counter (or a checksum?)
if different, the query is invalid and must be removed from client side and
reexecuted, if not just get from query cache (in client side)
this add two news function at mysql protocol (one to get table
counters/checksums), and maybe must add a table counter that changes after
each update/delete/alter and save it (probably) at .FRM file, the other to
return the checksum at each query (with this we can see tables used in a
update for example and invalid the cache)

Query cache is certain feature of the server which is completely 
transparent for the client side (and should be). What you written above 
_COULD_ be other cache and so should be called with other name to avoid 
confusion.


Please do not create confusion and mess in JIRA.

P.S.: BTW sql_mode & Co are stored on server side and only that data 
does matter for the server response (JFYI).




___
Mailing list: https://launchpad.net/~maria-developers
Post to : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-developers] query cache issue

2013-06-25 Thread Roberto Spadim
it's a memory in client side with query_parameters (sql_mode, query text,
schema used, and others flags that change results) + query_results
example in php
$query_cache= array(
"sql_mode=12341234124124;SELECT * from query_Table" => array(
  "tables_used"=>array("query_Table"),
  0=>array('a'=>1,'b'=>2,'c'=>3),
  2=>array('a'=>1,'b'=>2,'c'=>3),
  3=>array('a'=>1,'b'=>2,'c'=>3),
  4=>array('a'=>1,'b'=>2,'c'=>3),
  )
);
$query_tables_checksum=array("query_Table"=>'some_checksum');
the query_table_checksum is the part of query cache to invalidade a query
at client side, it must be checked at each query execution (this can be
done in less time or near time of a cached query)

before get from client side cache, query the server about table changes, if
the counter (or a checksum?)
if different, the query is invalid and must be removed from client side and
reexecuted, if not just get from query cache (in client side)
this add two news function at mysql protocol (one to get table
counters/checksums), and maybe must add a table counter that changes after
each update/delete/alter and save it (probably) at .FRM file, the other to
return the checksum at each query (with this we can see tables used in a
update for example and invalid the cache)
___
Mailing list: https://launchpad.net/~maria-developers
Post to : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-developers] query cache issue

2013-06-25 Thread Oleksandr Byelkin

18.06.2013 04:16, Roberto Spadim пишет:

guys, i sent some (many) MDEV issues to have a better control over query
cache
i want to comment here to don't stay with this idea in my mind only...
i created some labels in JIRA:

[skip]

querycache_client - relative to implement query cache at client side (not
in server)


It is just interesting how QC can be connected to client side at all?

[skip]

___
Mailing list: https://launchpad.net/~maria-developers
Post to : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp


[Maria-developers] query cache issue

2013-06-17 Thread Roberto Spadim
guys, i sent some (many) MDEV issues to have a better control over query
cache
i want to comment here to don't stay with this idea in my mind only...
i created some labels in JIRA:

querycache - relative to query cache
qc_info - relative to qc_info plugin
querycache_client - relative to implement query cache at client side (not
in server)
querycache_control - relative to DELETE queries in cache, DELETE tables in
cache, LOCK/UNLOCK QUERY CACHE
querycache_insert - relative to prune of queries that should be or
shouldn't be cacheable
querycache_lowmen - realtive to what we could do if we get low men in query
cache
querycache_result - features relative to when should or shouldn't hit query
cache when query is cached

if they will be or not implemented is another history
is labels ok? should i remove it?

-- 
Roberto Spadim
___
Mailing list: https://launchpad.net/~maria-developers
Post to : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp