From 8a08005bc70ef3003b9ac434cc67cb2ecdbba62b Mon Sep 17 00:00:00 2001 From: Philip Olson Date: Thu, 22 Mar 2012 23:34:48 +0000 Subject: [PATCH] Minor update: typos and a little markup/grammar git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@324475 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/mysqlnd_qc/changes.xml | 2 +- reference/mysqlnd_qc/constants.xml | 2 +- reference/mysqlnd_qc/quickstart.xml | 81 ++++++++++++++--------------- reference/mysqlnd_qc/setup.xml | 2 +- 4 files changed, 43 insertions(+), 44 deletions(-) diff --git a/reference/mysqlnd_qc/changes.xml b/reference/mysqlnd_qc/changes.xml index 1cce926fe5..6800711d1b 100644 --- a/reference/mysqlnd_qc/changes.xml +++ b/reference/mysqlnd_qc/changes.xml @@ -24,7 +24,7 @@ - Motto/theme: PHP 5.4 compatbility, schema pattern based caching and mysqlnd_ms support + Motto/theme: PHP 5.4 compatibility, schema pattern based caching and mysqlnd_ms support diff --git a/reference/mysqlnd_qc/constants.xml b/reference/mysqlnd_qc/constants.xml index c48182def4..cd918ef7c3 100644 --- a/reference/mysqlnd_qc/constants.xml +++ b/reference/mysqlnd_qc/constants.xml @@ -10,7 +10,7 @@ - The query cache is controled by SQL hints. SQL hints are used to enable and + The query cache is controlled by SQL hints. SQL hints are used to enable and disable caching. SQL hints can be used to set the TTL of a query. diff --git a/reference/mysqlnd_qc/quickstart.xml b/reference/mysqlnd_qc/quickstart.xml index b044c314e5..04feffa82d 100644 --- a/reference/mysqlnd_qc/quickstart.xml +++ b/reference/mysqlnd_qc/quickstart.xml @@ -27,7 +27,7 @@ The query cache plugin is implemented as a PHP extension. It is written in C and operates under the hood of PHP. During the - startup of the PHP interpreter it gets registered as a + startup of the PHP interpreter, it gets registered as a mysqlnd plugin to replace selected mysqlnd C methods. Hereby, it can change the behaviour of any PHP MySQL extension (mysqli, @@ -57,7 +57,7 @@ A statement is either cached if the plugin is instructed to cache all statements globally using a or, if the query string starts with the SQL hint (/*qc=on*/). The plugin is capable of caching any - query isssued by calling appropriate API calls of any of the existing + query issued by calling appropriate API calls of any of the existing PHP MySQL extensions. @@ -130,12 +130,12 @@ PECL/mysqlnd_qc has a unique approach to caching result sets that is superior to application based cache solutions. Application based solutions first fetch a result set into PHP variables. Then, the PHP variables are serialized for - storing in a persistent cache and unserialized when fetching. The mysqlnd - query cache stores the raw wire protocol data send from MySQL to PHP in its cache - and replayes it, if still valid, on a cache hit. This way, it saves an extra + storage in a persistent cache, and then unserialized when fetching. The mysqlnd + query cache stores the raw wire protocol data sent from MySQL to PHP in its cache + and replays it, if still valid, on a cache hit. This way, it saves an extra serialization step for a cache put that all application based solutions have to do. It can store the raw wire protocol data in the cache without having to - serizalize into a PHP variable first and deserializing the PHP variable for storing + serialize into a PHP variable first and deserializing the PHP variable for storing in the cache again. @@ -210,7 +210,7 @@ mysqlnd_qc.enable_qc=1 A SQL hint is a SQL standards compliant comment. As a SQL comment it is ignored by the database. A statement is considered - eligable for caching if it either begins with the SQL hint enabling caching + eligible for caching if it either begins with the SQL hint enabling caching or it is a SELECT statement. @@ -223,22 +223,22 @@ mysqlnd_qc.enable_qc=1 - not eliable for caching and not cached: INSERT INTO test(id) VALUES (1) + not eligible for caching and not cached: INSERT INTO test(id) VALUES (1) - not eliable for caching and not cached: SHOW ENGINES + not eligible for caching and not cached: SHOW ENGINES - eliable for caching but uncached: SELECT id FROM test + eligible for caching but uncached: SELECT id FROM test - eliable for caching and cached: /*qc=on*/SELECT id FROM test + eligible for caching and cached: /*qc=on*/SELECT id FROM test @@ -281,7 +281,7 @@ printf("Total time cached query: %.6fs\n", microtime(true) - $start); ?> ]]> - &examples.outputs; + &examples.outputs.similar; default storage handler. The default storage handler uses process memory to hold a cache entry. - Depending on the PHP deploymnet model a PHP process may serve one or more + Depending on the PHP deployment model, a PHP process may serve one or more web requests. Please, consult the web server manual for details. Details make no difference for the examples given in the quickstart. @@ -419,7 +419,7 @@ for ($i = 0; $i < 3; $i++) { ?> ]]> - &examples.outputs; + &examples.outputs.similar; ]]> - &examples.outputs; + &examples.outputs.similar; ]]> - &examples.outputs; + &examples.outputs.similar; - User-defined cache storage handler can implement any invalidation strategy - to work around this limitation. Please, find more on this below. + A user-defined cache storage handler can implement any invalidation strategy + to work around this limitation. The default TTL can be overruled using the SQL hint @@ -671,7 +671,7 @@ printf("Script runtime\t: %d seconds\n", microtime(true) - $start); ?> ]]> - &examples.outputs; + &examples.outputs.similar; - mysqlnd_qc.cache_by_default = 1. This apporach is often of little + mysqlnd_qc.cache_by_default = 1. This approach is often of little practical value. But it enables users to make a quick estimation about the maximum performance gains from caching. An application designed to - use a cache may able to prefix selected statements with the appropriate SQL + use a cache may be able to prefix selected statements with the appropriate SQL hints. However, altering an applications source code may not always be possible or desired, for example, to avoid problems with software updates. Therefore, PECL/mysqlnd_qc allows setting a callback which decides if a query is to be @@ -711,12 +711,12 @@ Script runtime : 3 seconds The callback is installed with the mysqlnd_qc_set_is_select function. The callback is given the statement string of every statement inspected by the plugin. Then, the callback can decide whether to cache - the function. The callback is supposed to return FALSE - if the statement shall not be cached. A return value of TRUE + the function. The callback is supposed to return &false; + if the statement shall not be cached. A return value of &true; makes the plugin try to add the statement into the cache. The cache entry will be given the default TTL ( mysqlnd_qc.ttl). If the callback returns - a numberical value it is used as the TTL instead of the global default. + a numerical value it is used as the TTL instead of the global default. @@ -770,7 +770,7 @@ printf("Cache hit: %d\n", $stats['cache_hit']); ?> ]]> - &examples.outputs; + &examples.outputs.similar; The examples callback tests if a statement string matches a pattern. - If this is the case, it either returns TRUE to cache + If this is the case, it either returns &true; to cache the statement using the global default TTL or an alternative TTL. @@ -1004,7 +1004,7 @@ foreach ($summary as $query => $details) { ?> ]]> - &examples.outputs; + &examples.outputs.similar; $details) { gives storage handler specific information which includes a list of all cached items, depending on the storage handler. Additionally, the core of PECL/mysqlnd_qc collects high-level summary statistics aggregated - per PHP process. The high-level satistics are returned by + per PHP process. The high-level statistics are returned by mysqlnd_qc_get_core_stats. @@ -1038,16 +1038,15 @@ foreach ($summary as $query => $details) { mysqlnd_qc_get_normalized_query_trace_log and mysqlnd_qc_get_core_stats - will not collect data unless, data collection has been - enabled through their corresponding PHP configuration directives. Please, - find the names of the configuration directives in the examples. Data collection - is disabled by default for performance considerations. It has been made - configurable through - mysqlnd_qc.time_statistics whether to collect timing - information or not. Collection of time statistics is enabled by default - but only performed, if data collection as such has been enabled. + will not collect data unless data collection has been + enabled through their corresponding PHP configuration directives. Data collection + is disabled by default for performance considerations. It is configurable with the + >mysqlnd_qc.time_statistics + option, which determines if timing information should be collected. + Collection of time statistics is enabled by default + but only performed if data collection as such has been enabled. Recording time statistics causes extra system calls. In most cases, - the benefit of the monitoring outweights any potential performance penalty of + the benefit of the monitoring outweighs any potential performance penalty of the additional system calls. @@ -1080,7 +1079,7 @@ var_dump(mysqlnd_qc_get_core_stats()); ?> ]]> - &examples.outputs; + &examples.outputs.similar; ]]> - &examples.outputs; + &examples.outputs.similar; ]]> - &examples.outputs; + &examples.outputs.similar; free(); ?> ]]> - &examples.outputs; + &examples.outputs.similar; PHP 5.3.3 or a newer version of PHP 5.3. - PHP 5.4.0 support is in preparation. + PHP 5.4.0 is not yet supported. PECL/mysqlnd_qc is a mysqlnd plugin. It plugs into the mysqlnd library.