-
Notifications
You must be signed in to change notification settings - Fork 702
/
stats.xml
1651 lines (1529 loc) · 55.7 KB
/
stats.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="utf-8"?>
<chapter xml:id="mysqlnd.stats" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>Statistics</title>
<para>
MySQL Native Driver contains support for gathering statistics on the
communication between the client and the server. The statistics
gathered are of two main types:
<itemizedlist>
<listitem>
<simpara>Client statistics</simpara>
</listitem>
<listitem>
<simpara>Connection statistics</simpara>
</listitem>
</itemizedlist>
</para>
<para>
When using the <link linkend="book.mysqli">mysqli</link> extension,
these statistics can be obtained through two API calls:
<itemizedlist>
<listitem>
<simpara><function>mysqli_get_client_stats</function></simpara>
</listitem>
<listitem>
<simpara><function>mysqli_get_connection_stats</function></simpara>
</listitem>
</itemizedlist>
</para>
<note>
<simpara>
Statistics are aggregated among all extensions that use the MySQL Native
Driver.
For example, if the <link linkend="book.mysqli">mysqli</link>
extension and the PDO MySQL driver are both set-up to use MySQLnd,
then function calls from <link linkend="book.mysqli">mysqli</link>
and method calls from PDO will affect the statistics.
</simpara>
<simpara>
There is no way to find out how much a certain API call of any extension
that has been compiled against MySQL Native Driver has impacted a certain
statistic.
</simpara>
</note>
<section xml:id="mysqlnd.stats.retrieve" annotations="chunk:false">
<title>Retrieving statistics</title>
<simpara>
Client statistics can be retrieved by calling the
<function>mysqli_get_client_stats</function> function.
</simpara>
<simpara>
Connection statistics can be retrieved by calling the
<function>mysqli_get_connection_stats</function> function.
</simpara>
<simpara>
Both functions return an associative array,
where the name of a statistic is the key for the corresponding
statistical data.
</simpara>
</section>
<section xml:id="mysqlnd.stats.statistics" annotations="chunk:false">
<title>MySQL Native Driver Statistics</title>
<simpara>
Most statistics are associated to a connection, but some are associated
to the process in which case this will be mentioned.
<!-- Process running the server? -->
</simpara>
<simpara>
The following statistics are produced by the MySQL Native Driver:
</simpara>
<variablelist>
<title>Network Related Statistics</title>
<varlistentry xml:id="mysqlnd.stats.statistics.bytes-sent">
<term><literal>bytes_sent</literal></term>
<listitem>
<simpara>
Number of bytes sent from PHP to the MySQL server.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.bytes-received">
<term><literal>bytes_received</literal></term>
<listitem>
<simpara>
Number of bytes received from the MySQL server.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.packets-sent">
<term><literal>packets_sent</literal></term>
<listitem>
<simpara>
Number of packets sent by the MySQL Client Server protocol.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.packets-received">
<term><literal>packets_received</literal></term>
<listitem>
<simpara>
Number of packets received from the MySQL Client Server protocol.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.protocol-overhead-in">
<term><literal>protocol_overhead_in</literal></term>
<listitem>
<simpara>
MySQL Client Server protocol overhead in bytes for incoming traffic.
Currently only the Packet Header (4 bytes) is considered as overhead.
<code>protocol_overhead_in = packets_received * 4</code>
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.protocol-overhead-out">
<term><literal>protocol_overhead_out</literal></term>
<listitem>
<simpara>
MySQL Client Server protocol overhead in bytes for outgoing traffic.
Currently only the Packet Header (4 bytes) is considered as overhead.
<code>protocol_overhead_out = packets_received * 4</code>
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.bytes-received-ok-packet">
<term><literal>bytes_received_ok_packet</literal></term>
<listitem>
<simpara>
Total size of bytes of MySQL Client Server protocol OK packets received.
OK packets can contain a status message.
The length of the status message can vary and thus the size of an OK
packet is not fixed.
</simpara>
<note>
<simpara>
The total size in bytes includes the size of the header packet
(4 bytes, see protocol overhead).
</simpara>
</note>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.packets-received-ok">
<term><literal>packets_received_ok</literal></term>
<listitem>
<simpara>
Number of MySQL Client Server protocol OK packets received.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.bytes-received-eof-packet">
<term><literal>bytes_received_eof_packet</literal></term>
<listitem>
<simpara>
Total size in bytes of MySQL Client Server protocol EOF packets received.
EOF can vary in size depending on the server version.
Also, EOF can transport an error message.
</simpara>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('mysqlnd.stats.statistics.bytes-received-ok-packet')/db:listitem/db:note)">
<xi:fallback/>
</xi:include>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.packets-received-eof">
<term><literal>packets_received_eof</literal></term>
<listitem>
<simpara>
Number of MySQL Client Server protocol EOF packets.
</simpara>
<simpara>
Like with other packet statistics the number of packets will be
increased even if PHP does not receive the expected packet but,
for example, an error message.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.bytes-received-rset-header-packet">
<term><literal>bytes_received_rset_header_packet</literal></term>
<listitem>
<simpara>
Total size in bytes of MySQL Client Server protocol result set header
packets.
The size of the packets varies depending on the payload
(<literal>LOAD LOCAL INFILE</literal>, <literal>INSERT</literal>,
<literal>UPDATE</literal>, <literal>SELECT</literal>, error message).
</simpara>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('mysqlnd.stats.statistics.bytes-received-ok-packet')/db:listitem/db:note)">
<xi:fallback/>
</xi:include>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.packets-received-rset-header">
<term><literal>packets_received_rset_header</literal></term>
<listitem>
<simpara>
Number of MySQL Client Server protocol result set header packets.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.bytes-received-rset-field-meta-packet">
<term><literal>bytes_received_rset_field_meta_packet</literal></term>
<listitem>
<simpara>
Total size in bytes of MySQL Client Server protocol result set metadata
(field information) packets.
Of course the size varies with the fields in the result set.
The packet may also transport an error or an EOF packet in case of
COM_LIST_FIELDS.
</simpara>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('mysqlnd.stats.statistics.bytes-received-ok-packet')/db:listitem/db:note)">
<xi:fallback/>
</xi:include>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.packets-received-rset-field-meta">
<term><literal>packets_received_rset_field_meta</literal></term>
<listitem>
<simpara>
Number of MySQL Client Server protocol result set metadata
(field information) packets.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.bytes-received-rset-row-packet">
<term><literal>bytes_received_rset_row_packet</literal></term>
<listitem>
<simpara>
Total size in bytes of MySQL Client Server protocol result set row data
packets.
The packet may also transport an error or an EOF packet.
One can compute the number of error and EOF packets by subtracting
<literal>rows_fetched_from_server_normal</literal>
and <literal>rows_fetched_from_server_ps</literal>
from <literal>bytes_received_rset_row_packet</literal>.
</simpara>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('mysqlnd.stats.statistics.bytes-received-ok-packet')/db:listitem/db:note)">
<xi:fallback/>
</xi:include>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.packets-received-rset-row">
<term><literal>packets_received_rset_row</literal></term>
<listitem>
<simpara>
Number of MySQL Client Server protocol result set row data packets.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.bytes-received-prepare-response-packet">
<term><literal>bytes_received_prepare_response_packet</literal></term>
<listitem>
<simpara>
Total size in bytes of MySQL Client Server protocol OK for Prepared
Statement Initialization packets (prepared statement init packets).
The packet may also transport an error.
The packet size depends on the MySQL version.
</simpara>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('mysqlnd.stats.statistics.bytes-received-ok-packet')/db:listitem/db:note)">
<xi:fallback/>
</xi:include>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.packets-received-prepare-response">
<term><literal>packets_received_prepare_response</literal></term>
<listitem>
<simpara>
Number of MySQL Client Server protocol OK for Prepared Statement
Initialization packets (prepared statement init packets).
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.bytes-received-change-user-packet">
<term><literal>bytes_received_change_user_packet</literal></term>
<listitem>
<simpara>
Total size in bytes of MySQL Client Server protocol COM_CHANGE_USER packets.
The packet may also transport an error or EOF.
</simpara>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('mysqlnd.stats.statistics.bytes-received-ok-packet')/db:listitem/db:note)">
<xi:fallback/>
</xi:include>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.packets-received-change-user">
<term><literal>packets_received_change_user</literal></term>
<listitem>
<simpara>
Number of MySQL Client Server protocol COM_CHANGE_USER packets.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.packets-sent-command">
<term><literal>packets_sent_command</literal></term>
<listitem>
<simpara>
Number of MySQL Client Server protocol commands sent from PHP to MySQL.
</simpara>
<simpara>
There is no way to know which specific commands and how many of
them have been sent.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.bytes-received-real-data_normal">
<term><literal>bytes_received_real_data_normal</literal></term>
<listitem>
<simpara>
Number of bytes of payload fetched by the PHP client from
<literal>mysqlnd</literal> using the text protocol.
</simpara>
<simpara>
This is the size of the actual data contained in result sets that do not
originate from prepared statements and which have been fetched by the PHP client.
</simpara>
<simpara>
Note that although a full result set may have been pulled from MySQL
by <literal>mysqlnd</literal>, this statistic only counts actual data
pulled from <literal>mysqlnd</literal> by the PHP client.
</simpara>
<para>
An example of a code sequence that will increase the value is as follows:
<programlisting>
<![CDATA[
$mysqli = new mysqli();
$res = $mysqli->query("SELECT 'abc'");
$res->fetch_assoc();
$res->close();
]]>
</programlisting>
Every fetch operation will increase the value.
</para>
<para>
However, the statistic will not be increased if the result set is only
buffered on the client, but not fetched, such as in the following example:
<programlisting>
<![CDATA[
$mysqli = new mysqli();
$res = $mysqli->query("SELECT 'abc'");
$res->close();
]]>
</programlisting>
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.bytes-received-real-data-ps">
<term><literal>bytes_received_real_data_ps</literal></term>
<listitem>
<simpara>
Number of bytes of the payload fetched by the PHP client from
<literal>mysqlnd</literal> using the prepared statement protocol.
</simpara>
<simpara>
This is the size of the actual data contained in result sets that
originate from prepared statements and which have been fetched by the PHP client.
</simpara>
<simpara>
The value will not be increased if the result set is not subsequently read by the PHP client.
</simpara>
<simpara>
Note that although a full result set may have been pulled from MySQL
by <literal>mysqlnd</literal>, this statistic only counts actual data
pulled from <literal>mysqlnd</literal> by the PHP client.
</simpara>
<simpara>
See also <literal>bytes_received_real_data_normal</literal>.
</simpara>
</listitem>
</varlistentry>
</variablelist>
<variablelist>
<title>Result Set Related Statistics</title>
<varlistentry xml:id="mysqlnd.stats.statistics.result-set-queries">
<term><literal>result_set_queries</literal></term>
<listitem>
<simpara>
Number of queries that have generated a result set.
Examples of queries that generate a result set:
<literal>SELECT</literal>, <literal>SHOW</literal>.
</simpara>
<simpara>
The statistic will not be incremented if there is an error reading
the result set header packet from the line.
</simpara>
<note>
<simpara>
This statistic can be used as an indirect measure for the number of
queries PHP has sent to MySQL.
This could help identifying a client that causes a high database load.
</simpara>
</note>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.non-result-set-queries">
<term><literal>non_result_set_queries</literal></term>
<listitem>
<simpara>
Number of queries that did not generate a result set.
Examples of queries that do not generate a result set:
<literal>INSERT</literal>, <literal>UPDATE</literal>, <literal>LOAD DATA</literal>.
</simpara>
<simpara>
The statistic will not be incremented if there is an error reading
the result set header packet from the line.
</simpara>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('mysqlnd.stats.statistics.result-set-queries')/db:listitem/db:note)">
<xi:fallback/>
</xi:include>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.no-index-used">
<term><literal>no_index_used</literal></term>
<listitem>
<simpara>
Number of queries that have generated a result set but did not use an index.
(See also the mysqld start option <literal>–log-queries-not-using-indexes</literal>).
</simpara>
<note>
<simpara>
Those queries can be reported via an exception by calling
<code>mysqli_report(MYSQLI_REPORT_INDEX);</code>.
It is possible to have them be reported via a warning instead by calling
<code>mysqli_report(MYSQLI_REPORT_INDEX ^ MYSQLI_REPORT_STRICT);</code>.
</simpara>
</note>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.bad-index-used">
<term><literal>bad_index_used</literal></term>
<listitem>
<simpara>
Number of queries that have generated a result set and did not use a good index.
(See also the mysqld start option <literal>–log-slow-queries</literal>).
</simpara>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('mysqlnd.stats.statistics.no-index-used')/db:listitem/db:note)">
<xi:fallback/>
</xi:include>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.slow-queries">
<term><literal>slow_queries</literal></term>
<listitem>
<simpara>
SQL statements that took more than <literal>long_query_time</literal>
seconds to execute and required at least
<literal>min_examined_row_limit</literal> rows to be examined.
</simpara>
<caution>
<simpara>
Not reported through <function>mysqli_report</function>.
</simpara>
</caution>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.buffered-sets">
<term><literal>buffered_sets</literal></term>
<listitem>
<simpara>
Number of buffered result sets returned by normal
(i.e. not via a prepared statement) queries.
</simpara>
<para>
Examples of API calls that will buffer result sets on the client:
<simplelist type="inline">
<member><function>mysqli_query</function></member>
<member><function>mysqli_store_result</function></member>
<member><function>mysqli_stmt_get_result</function></member>
</simplelist>
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.unbuffered-sets">
<term><literal>unbuffered_sets</literal></term>
<listitem>
<simpara>
Number of unbuffered result sets returned by normal
(i.e. not via a prepared statement) queries.
</simpara>
<para>
Examples of API calls that will not buffer result sets on the client:
<simplelist type="inline">
<member><function>mysqli_use_result</function></member>
</simplelist>
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.ps-buffered-sets">
<term><literal>ps_buffered_sets</literal></term>
<listitem>
<simpara>
Number of buffered result sets returned by prepared statements.
</simpara>
<para>
Examples of API calls that will buffer result sets on the client:
<simplelist type="inline">
<member><function>mysqli_stmt_store_result</function></member>
</simplelist>
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.ps-unbuffered-sets">
<term><literal>ps_unbuffered_sets</literal></term>
<listitem>
<simpara>
Number of unbuffered result sets returned by prepared statements.
</simpara>
<simpara>
By default prepared statements are unbuffered,
thus most prepared statements will be accounted in this statistic.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.flushed-normal-sets">
<term><literal>flushed_normal_sets</literal></term>
<listitem>
<simpara>
Number of result sets returned by normal
(i.e. not via a prepared statement) queries
with unread data that have been silently flushed.
</simpara>
<note>
<simpara>
Flushing happens only with unbuffered result sets.
</simpara>
<simpara>
Unbuffered result sets must be fetched completely before a new query can
be run on the connection otherwise MySQL will throw an error.
If the application does not fetch all rows from an unbuffered result set,
mysqlnd does implicitly fetch the result set to clear the line.
</simpara>
<simpara>
See also <literal>rows_skipped_normal</literal>, <literal>rows_skipped_ps</literal>.
</simpara>
<para>
Some possible causes for an implicit flush:
<itemizedlist>
<listitem>
<simpara>
Faulty client application
</simpara>
</listitem>
<listitem>
<simpara>
Client stopped reading after it found what it was looking for
but has made MySQL calculate more records than needed
</simpara>
</listitem>
<listitem>
<simpara>
Client application has stopped unexpectedly
</simpara>
</listitem>
</itemizedlist>
</para>
</note>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.flushed-ps-sets">
<term><literal>flushed_ps_sets</literal></term>
<listitem>
<simpara>
Number of result sets from prepared statements
with unread data that have been silently flushed.
</simpara>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('mysqlnd.stats.statistics.flushed-normal-sets')/db:listitem/db:note)">
<xi:fallback/>
</xi:include>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.ps-prepared-never-executed">
<term><literal>ps_prepared_never_executed</literal></term>
<listitem>
<simpara>
Number of statements prepared but never executed.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.ps-prepared-once-executed">
<term><literal>ps_prepared_once_executed</literal></term>
<listitem>
<simpara>
Number of prepared statements executed only once.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.rows-fetched-from-server-normal">
<term><literal>rows_fetched_from_server_normal</literal></term>
<term><literal>rows_fetched_from_server_ps</literal></term>
<listitem>
<simpara>
Total number of result set rows fetched from the server.
This includes the rows which were not read by the client but
had been implicitly fetched due to flushed unbuffered result sets.
</simpara>
<simpara>
See also <literal>packets_received_rset_row</literal>.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.rows-buffered-from-server-normal">
<term><literal>rows_buffered_from_client_normal</literal></term>
<listitem>
<simpara>
Total number of buffered rows originating from a normal query.
</simpara>
<simpara>
This is the number of rows that have been fetched from MySQL and buffered on client.
</simpara>
<para>
Examples of queries that will buffer results:
<simplelist>
<member><function>mysqli_query</function></member>
<member><function>mysqli_store_result</function></member>
</simplelist>
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.rows-buffered-from-server-ps">
<term><literal>rows_buffered_from_server_ps</literal></term>
<listitem>
<simpara>
Same as <literal>rows_buffered_from_client_normal</literal>
but for prepared statements.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.rows-fetched-from-client-normal-buffered">
<term><literal>rows_fetched_from_client_normal_buffered</literal></term>
<listitem>
<simpara>
Total number of rows fetched by the client from a buffered result set
created by a normal query.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.rows-fetched-from-client-ps-buffered">
<term><literal>rows_fetched_from_client_ps_buffered</literal></term>
<listitem>
<simpara>
Total number of rows fetched by the client from a buffered result set
created by a prepared statement.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.rows-fetched-from-client-normal-unbuffered">
<term><literal>rows_fetched_from_client_normal_unbuffered</literal></term>
<listitem>
<simpara>
Total number of rows fetched by the client from an unbuffered result set
created by a normal query.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.rows-fetched-from-client-ps-unbuffered">
<term><literal>rows_fetched_from_client_ps_unbuffered</literal></term>
<listitem>
<simpara>
Total number of rows fetched by the client from an unbuffered result set
created by a prepared statement.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.rows-fetched-from-client-ps-cursor">
<term><literal>rows_fetched_from_client_ps_cursor</literal></term>
<listitem>
<simpara>
Total number of rows fetch by the client from a cursor created by a
prepared statement.
</simpara>
</listitem>
</varlistentry>
<!-- TODO: This seems to actually be supported, check and document -->
<varlistentry xml:id="mysqlnd.stats.statistics.rows-skipped-normal">
<term><literal>rows_skipped_normal</literal></term>
<term><literal>rows_skipped_ps</literal></term>
<listitem>
<simpara>
Reserved for future use (currently not supported).
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.copy-on-write">
<term><literal>copy_on_write_saved</literal></term>
<term><literal>copy_on_write_performed</literal></term>
<listitem>
<simpara>
This is a process level scope statistic.
</simpara>
<simpara>
With mysqlnd, variables returned by the extensions point into mysqlnd
internal network result buffers.
If the data are not changed, the fetched data is kept only once in memory.
However, any modification to the data will require mysqlnd to perform
a copy-on-write operation.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.free-result">
<term><literal>explicit_free_result</literal></term>
<term><literal>implicit_free_result</literal></term>
<listitem>
<simpara>
This is a connection and process level scope statistic.
</simpara>
<simpara>
Total number of freed result sets.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.proto-text-fetched-null">
<term><literal>proto_text_fetched_null</literal></term>
<listitem>
<simpara>
Total number of columns of type
<literal>MYSQL_TYPE_NULL</literal>
fetched from a normal query (MySQL text protocol).
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.proto-binary-fetched-null">
<term><literal>proto_binary_fetched_null</literal></term>
<listitem>
<simpara>
Total number of columns of type
<literal>MYSQL_TYPE_NULL</literal>
fetched from a prepared statement (MySQL binary protocol).
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.proto-text-fetched-bit">
<term><literal>proto_text_fetched_bit</literal></term>
<listitem>
<simpara>
Total number of columns of type
<literal>MYSQL_TYPE_BIT</literal>
fetched from a normal query (MySQL text protocol).
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.proto-binary-fetched-bit">
<term><literal>proto_binary_fetched_bit</literal></term>
<listitem>
<simpara>
Total number of columns of type
<literal>MYSQL_TYPE_BIT</literal>
fetched from a prepared statement (MySQL binary protocol).
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.proto-text-fetched-tinyint">
<term><literal>proto_text_fetched_tinyint</literal></term>
<listitem>
<simpara>
Total number of columns of type
<literal>MYSQL_TYPE_TINY</literal>
fetched from a normal query (MySQL text protocol).
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.proto-binary-fetched-tinyint">
<term><literal>proto_binary_fetched_tinyint</literal></term>
<listitem>
<simpara>
Total number of columns of type
<literal>MYSQL_TYPE_TINY</literal>
fetched from a prepared statement (MySQL binary protocol).
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.proto-text-fetched-short">
<term><literal>proto_text_fetched_short</literal></term>
<listitem>
<simpara>
Total number of columns of type
<literal>MYSQL_TYPE_SHORT</literal>
fetched from a normal query (MySQL text protocol).
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.proto-binary-fetched-short">
<term><literal>proto_binary_fetched_short</literal></term>
<listitem>
<simpara>
Total number of columns of type
<literal>MYSQL_TYPE_SHORT</literal>
fetched from a prepared statement (MySQL binary protocol).
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.proto-text-fetched-int24">
<term><literal>proto_text_fetched_int24</literal></term>
<listitem>
<simpara>
Total number of columns of type
<literal>MYSQL_TYPE_INT24</literal>
fetched from a normal query (MySQL text protocol).
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.proto-binary-fetched-int24">
<term><literal>proto_binary_fetched_int24</literal></term>
<listitem>
<simpara>
Total number of columns of type
<literal>MYSQL_TYPE_INT24</literal>
fetched from a prepared statement (MySQL binary protocol).
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.proto-text-fetched-int">
<term><literal>proto_text_fetched_int</literal></term>
<listitem>
<simpara>
Total number of columns of type
<literal>MYSQL_TYPE_LONG</literal>
fetched from a normal query (MySQL text protocol).
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.proto-binary-fetched-int">
<term><literal>proto_binary_fetched_int</literal></term>
<listitem>
<simpara>
Total number of columns of type
<literal>MYSQL_TYPE_LONG</literal>
fetched from a prepared statement (MySQL binary protocol).
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.proto-text-fetched-bigint">
<term><literal>proto_text_fetched_bigint</literal></term>
<listitem>
<simpara>
Total number of columns of type
<literal>MYSQL_TYPE_LONGLONG</literal>
fetched from a normal query (MySQL text protocol).
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.proto-binary-fetched-bigint">
<term><literal>proto_binary_fetched_bigint</literal></term>
<listitem>
<simpara>
Total number of columns of type
<literal>MYSQL_TYPE_LONGLONG</literal>
fetched from a prepared statement (MySQL binary protocol).
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.proto-text-fetched-decimal">
<term><literal>proto_text_fetched_decimal</literal></term>
<listitem>
<simpara>
Total number of columns of type
<literal>MYSQL_TYPE_DECIMAL</literal>, or <literal>MYSQL_TYPE_NEWDECIMAL</literal>
fetched from a normal query (MySQL text protocol).
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.proto-binary-fetched-decimal">
<term><literal>proto_binary_fetched_decimal</literal></term>
<listitem>
<simpara>
Total number of columns of type
<literal>MYSQL_TYPE_DECIMAL</literal>, or <literal>MYSQL_TYPE_NEWDECIMAL</literal>
fetched from a prepared statement (MySQL binary protocol).
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.proto-text-fetched-float">
<term><literal>proto_text_fetched_float</literal></term>
<listitem>
<simpara>
Total number of columns of type
<literal>MYSQL_TYPE_FLOAT</literal>
fetched from a normal query (MySQL text protocol).
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.proto-binary-fetched-float">
<term><literal>proto_binary_fetched_float</literal></term>
<listitem>
<simpara>
Total number of columns of type
<literal>MYSQL_TYPE_FLOAT</literal>
fetched from a prepared statement (MySQL binary protocol).
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.proto-text-fetched-double">
<term><literal>proto_text_fetched_double</literal></term>
<listitem>
<simpara>
Total number of columns of type
<literal>MYSQL_TYPE_DOUBLE</literal>
fetched from a normal query (MySQL text protocol).
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.proto-binary-fetched-double">
<term><literal>proto_binary_fetched_double</literal></term>
<listitem>
<simpara>
Total number of columns of type
<literal>MYSQL_TYPE_DOUBLE</literal>
fetched from a prepared statement (MySQL binary protocol).
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.proto-text-fetched-date">
<term><literal>proto_text_fetched_date</literal></term>
<listitem>
<simpara>
Total number of columns of type
<literal>MYSQL_TYPE_DATE</literal>, or <literal>MYSQL_TYPE_NEWDATE</literal>
fetched from a normal query (MySQL text protocol).
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="mysqlnd.stats.statistics.proto-binary-fetched-date">
<term><literal>proto_binary_fetched_date</literal></term>
<listitem>
<simpara>