[ Pobierz całość w formacie PDF ]
.6 Database information items for database characteristics (continued)API GUIDE 51 CHAPTER 4 WORKING WITH DATABASESEnvironmental characteristicsSeveral items are provided for determining environmental characteristics, such asthe amount of memory currently in use, or the number of database cache bufferscurrently allocated.These items are described in the following table:Request buffer item Result buffer contentsisc_info_current_memory Amount of server memory (in bytes) currently in useisc_info_forced_writes Number specifying the mode in which database writes are performed (0for asynchronous, 1 for synchronous)isc_info_max_memory Maximum amount of memory (in bytes) used at one time since the firstprocess attached to the databaseisc_info_num_buffers Number of memory buffers currently allocatedisc_info_sweep_interval Number of transactions that are committed between  sweeps to removedatabase record versions that are no longer neededisc_info_user_names Names of all the users currently attached to the database; for each suchuser, the result buffer contains an isc_info_user_names byte followed bya 1-byte length specifying the number of bytes in the user name, followedby the user nameTABLE 4.7 Database information items for environmental characteristicsNote Not all environmental information items are available on all platforms.Performance statisticsThere are four items that request performance statistics for a database.These statisticsaccumulate for a database from the moment it is first attached by any process until thelast remaining process detaches from the database.For example, the value returned for isc_info_reads is the number of reads since thecurrent database was first attached, that is, an aggregate of all reads done by all attachedprocesses, rather than the number of reads done for the calling program since it attachedto the database.52 INTERBASE 5 REQUESTING INFORMATION ABOUT AN ATTACHMENTTable 4.8 lists the request performance statistics are summarized in the following table:Request buffer item Result buffer contentsisc_info_fetches Number of reads from the memory buffer cacheisc_info_marks Number of writes to the memory buffer cacheisc_info_reads Number of page readsisc_info_writes Number of page writesTABLE 4.8 Database information items for performance statisticsDatabase operation countsSeveral information items are provided for determining the number of various databaseoperations performed by the currently attached calling program.These values arecalculated on a per-table basis.When any of these information items is requested, InterBase returns to the result buffer:1 byte specifying the item type (for example, isc_info_insert_count).2 bytes telling how many bytes compose the subsequent value pairs.A pair of values for each table in the database on which the requested type of operationhas occurred since the database was last attached.Each pair consists of:2 bytes specifying the table ID.4 bytes listing the number of operations (for example, inserts) done on that table.TIP To determine an actual table name from a table ID, query the system table,RDB$RELATION.API GUIDE 53 CHAPTER 4 WORKING WITH DATABASESThe following table describes the items which return count values for operations on thedatabase:Request buffer item Result buffer contentsisc_info_backout_count Number of removals of a version of a recordisc_info_delete_count Number of database deletes since the database was last attachedisc_info_expunge_count Number of removals of a record and all of its ancestors, for recordswhose deletions have been committedisc_info_insert_count Number of inserts into the database since the database was lastattachedisc_info_purge_count Number of removals of old versions of fully mature records (recordscommitted, resulting in older ancestor versions no longer beingneeded)isc_info_read_idx_count Number of reads done via an index since the database was lastattachedisc_info_read_seq_count Number of sequential database reads, that is, the number of sequentialtable scans (row reads) done on each table since the database was lastattachedisc_info_update_count Number of database updates since the database was last attachedTABLE 4 [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • czarkowski.pev.pl
  •