@@ -327,10 +327,129 @@ SQL> SET PER_TAB OFF;
327327
328328
329329
330+ 12) SET WIRE_STATS option.
331+
332+ Author: Vladyslav Khorsun <hvlad at users sourceforge net>
333+
334+ When set to ON shows wire (network) statistics after query execution.
335+ It is set to OFF by default. The name WIRE_STATS could be shortened up to WIRE.
336+
337+ The statistics counters shown in two groups: 'logical' and 'physical':
338+ - logical counters show numbers of packets in terms of Firebird wire protocol
339+ and number of bytes send before compression and received after decompression;
340+ - physical counters show number of physical packets and bytes send and
341+ received over the wire, number of bytes could be affected by wire compression,
342+ if present. Also, number of network roundtrips is shown: it is number of
343+ changes of IO direction from 'send' to 'receive'.
344+
345+ Note, wire statistics is gathered by Remote provider only, i.e. it is always
346+ zero for embedded connections. Also, it is collected by client and IO direction
347+ (send, receive) is shown from client point of view.
348+
349+ Examples:
350+
351+ 1. INET protocol with wire compression.
352+ Set WireCompression = true in firebird.conf
353+
354+ >isql inet://employee
355+
356+ SQL> SET;
357+ Print statistics: OFF
358+ Print per-table stats: OFF
359+ Print wire stats: OFF
360+ ...
361+
362+ SQL> SET WIRE;
363+ SQL>
364+ SQL> SELECT COUNT(*) FROM RDB$RELATIONS;
365+
366+ COUNT
367+ =====================
368+ 67
369+
370+ Wire logical statistics:
371+ send packets = 6
372+ recv packets = 5
373+ send bytes = 184
374+ recv bytes = 224
375+ Wire physical statistics:
376+ send packets = 3
377+ recv packets = 2
378+ send bytes = 123
379+ recv bytes = 88
380+ roundtrips = 2
381+
382+ Note difference due to wire compression in send/recv bytes for logical and
383+ physical stats.
384+
385+
386+ 2. XNET protocol (wire compression is not used).
387+
388+ >isql xnet://employee
389+
390+ SQL> SET WIRE;
391+ SQL>
392+ SQL> SELECT COUNT(*) FROM RDB$RELATIONS;
393+
394+ COUNT
395+ =====================
396+ 67
397+
398+ Wire logical statistics:
399+ send packets = 5
400+ recv packets = 6
401+ send bytes = 176
402+ recv bytes = 256
403+ Wire physical statistics:
404+ send packets = 5
405+ recv packets = 5
406+ send bytes = 176
407+ recv bytes = 256
408+ roundtrips = 5
409+
410+ Note, send/recv bytes for logical and physical stats are equal.
411+
412+
413+ 3. Embedded connection (wire statistics is absent).
414+
415+ SQL> SET WIRE;
416+ SQL>
417+ SQL> select count(*) from rdb$relations;
418+
419+ COUNT
420+ =====================
421+ 67
422+
423+ Wire logical statistics:
424+ send packets = 0
425+ recv packets = 0
426+ send bytes = 0
427+ recv bytes = 0
428+ Wire physical statistics:
429+ send packets = 0
430+ recv packets = 0
431+ send bytes = 0
432+ recv bytes = 0
433+ roundtrips = 0
434+
435+
436+
437+ 13) SHOW WIRE_STATISTICS command.
438+
439+ Author: Vladyslav Khorsun <hvlad at users sourceforge net>
440+
441+ New ISQL command that shows accumulated wire statistics. There is also
442+ shortened alias WIRE_STATS.
443+
444+ The command show values of wire statistics counters, accumulated since the
445+ connection start time. Format is the same as of SET STATS above.
446+
447+
448+
330449Isql enhancements in Firebird v6.
331450---------------------------------
332451
333- 12 ) EXPLAIN statement.
452+ 14 ) EXPLAIN statement.
334453
335454Author: Adriano dos Santos Fernandes
336455
355474SQL> set term ;!
356475
357476
358- 13 ) SET AUTOTERM ON/OFF
477+ 15 ) SET AUTOTERM ON/OFF
359478
360479Author: Adriano dos Santos Fernandes
361480
0 commit comments