Edit this page on github
Frequently asked questions on comdb2

comdb2_active_osqls

Information about OSQL requests in the database.

comdb2_active_osqls(type, origin, argv0, where, cnonce, request_id, nops,
                    start_time, commit_time, nretries)

comdb2_appsock_handlers

Lists all available APPSOCK handlers.

comdb2_appsock_handlers(name, usage, exec_count)

comdb2_blkseq

Information about BLKSEQ stored in the database. (TODO: Explain BLKSEQ)

comdb2_blkseq(stripe, index, id, size, rcode, time, age)

comdb2_clientstats

Lists statistics about clients.

comdb2_clientstats(task, stack, host, ip, finds, rngexts, writes,
                   other_fstsnds, adds, upds, dels, bsql, recom,
                   snapisol, serial, sql_queries, sql_steps, sql_rows,
                   svc_time)

comdb2_cluster

Information about nodes in the cluster.

comdb2_cluster(host, port, is_master, coherent_state)

comdb2_columns

Describes all the columns for all of the tables in the database.

comdb2_columns(tablename, columnnname, type, size, sqltype,
varinlinesize, defaultvalue, dbload, isnullable, lastsequence)

comdb2_completion

This table lists all keywords & identifiers based on the current state of the database. cdb2sql uses it to provide auto-completion feature.

comdb2_completion(candidate)

comdb2_constraints

Shows all foreign key constraints on tables in the database.

comdb2_constraints(tablename, keyname, foreigntablename,
foreignkeyname, iscascadingdelete, iscascadingupdate)

comdb2_cron_events

Information about events queued in all the schedulers running.

comdb2_cron_events(name, type, epoch, arg1, arg2, arg3, sourceid)

comdb2_cron_schedulers

Information about schedulers running.

comdb2_cron_schedulers(name, type, running, nevents, description)

comdb2_fdb_info

The cached remote schemas used for distributed sql execution.

comdb2_fdb_info(dbname, location, tablename, indexname, rootpage, remoterootpage, version)

comdb2_functions

The functions available to call from sql.

comdb2_functions(name)

comdb2_keycomponents

Describes all the components of the keys.

comdb2_keycomponents(tablename, keyname, columnnumber, columnname,
isdescending)

comdb2_keys

Describes all of the keys in the database.

comdb2_keys(tablename, keyname, keynumber, isunique, isdatacopy,
isrecnum, condition, ispartialdatacopy)

comdb2_keywords

Describes all the keywords used in the database. A reserved keyword needs to be quoted when used as an identifier.

comdb2_keywords(name, reserved)

comdb2_limits

Describes all the hard limits in the database.

comdb2_limits(name, description, value)

comdb2_locks

Lists all active comdb2 locks.

comdb2_locks(thread, lockerid, mode, status, object, locktype, page)

comdb2_logical_operations

Lists all logical operations

comdb2_logical_operations(commitlsn, opnum, operation, tablename, oldgenid,
                          oldrecord, genid, record)

comdb2_metrics

Shows various operational and performance metrics.

comdb2_metrics(name, description, type, value, collection_type)

comdb2_net_userfuncs

Statistics about network packets sent across cluster nodes.

comdb2_net_userfuncs(service, userfunc, count, totalus)

comdb2_opcode_handlers

Lists all opcode handlers available in Comdb2.

comdb2_opcode_handlers(opcode, name)

comdb2_partial_datacopies

Lists all of the partial datacopy columns for each relevant key in the database.

comdb2_partial_datacopies(tablename, keyname, columnname)

comdb2_plugins

Lists all plugins currently available in Comdb2.

comdb2_plugins(name, description, type, version, is_static)

comdb2_procedures

List all stored procedures in the database.

comdb2_procedures(name, version, client_versioned, default, src)

comdb2_queues

List all queues in the database.

comdb2_queues(queuename, spname, head_age, depth, total_enqueued, total_dequeued)

comdb2_repl_stats

Replication statistics.

comdb2_repl_stats(host, bytes_written, bytes_read, throttle_waits, reorders,
                  avg_wait_over_10secs, max_wait_over_10secs,
                  avg_wait_over_1min,  max_wait_over_1min)

comdb2_replication_netqueue

This table lists the current state of the replication network queue per node.

comdb2_replication_netqueue(machine, total, min_lsn, max_lsn, alive,
                            alive_req, all_req, dupmaster, file, file_req,
                            log, log_more, log_req, master_req, newclient,
                            newfile, newmaster, newsite, page, page_req,
                            plist, plist_req, verify, verify_fail,
                            verify_req, vote1, vote2, log_logput,
                            pgdump_req, gen_vote1, gen_vote2, log_fill,
                            uncategorized, unknown)

comdb2_sqlpool_queue

Information about SQL query pool status.

comdb2_sqlpool_queue(time_in_queue_ms, sql)

comdb2_systables

List all available system tables in Comdb2.

comdb2_systables(name)

comdb2_systablepermissions

Table of permissions for system tables in the database.

comdb2_systablepermissions(tablename, username, READ, WRITE, DDL)

comdb2_table_properties

This table lists miscellaneous table properties

comdb2_table_properties(table_name, odh, compress, blob_compress, 
in_place_updates, instant_schema_change)

comdb2_tablepermissions

Table of permissions for tables in the database.

comdb2_tablepermissions(tablename, username, READ, WRITE, DDL)

comdb2_tables

This is a table of all the existing tables in the database.

comdb2_tables(tablename)

comdb2_tablesizes

Shows the sizes on disk of the tables.

comdb2_tablesizes(tablename, bytes)

comdb2_temporary_file_sizes

Reports sizes of temporary files.

comdb2_temporary_file_sizes(type, bytes)

comdb2_threadpools

Information about thread pools in the database.

comdb2_threadpools(name, status, num_thd, free_thd, peak_thd, num_creates,
                   num_exits, num_passed, num_enqueued, num_dequeued,
                   num_timeout, num_failed_dispatches, min_thds, max_thds,
                   peak_queue, max_queue, queue, long_wait_ms,
                   linger_secs, stack_size, max_queue_override,
                   max_queue_age_ms, exit_on_create_fail, dump_on_full)

comdb2_timepartevents

Information about time partition events in the dedicated cron scheduler (alias for filtered comdb2_cron_events system table).

comdb2_timepartevents(name, type, arg1, arg2, arg3, sourceid)

comdb2_timepartitions

Information about time partitions.

comdb2_timepartitions(name, period, retention, nshards, version, shard0name, starttime, sourceid)

comdb2_timepartpermissions

Table of permissions for time partitions in the database.

comdb2_timepartpermissions(tablename, username, READ, WRITE, DDL)

comdb2_timepartshards

Information about time partition shards.

comdb2_timepartshards(name, shardname, start, end)

comdb2_timeseries

This table lists various metrics.

comdb2_timeseries(metric, time, value)

comdb2_transaction_logs

Lists all the transaction log records.

comdb2_transaction_logs(lsn, rectype, generation, timestamp, payload)

comdb2_transaction_state

Lists the state of all threads processing transactions.

comdb2_transaction_state(state, time, machine, opcode, function)

comdb2_triggers

Lists triggers in the database.

comdb2_triggers(name, type, tbl_name, event, col, seq)

comdb2_tunables

Describes all the knobs in the database.

comdb2_tunables(name, description, type, value, read_only)

comdb2_type_samples

Describes the sample values of all the data types supported by Comdb2.

comdb2_type_samples(integer, real, cstring, blob, datetime, intervalym,
                    intervalds, datetimeus, intervaldsus)

comdb2_users

Table of users for the database that do or do not have operator access.

comdb2_users(username, isOP)

comdb2_sc_history

System table containing history of the schemachanges done in the database.

comdb2_sc_history(name, start, status, seed, last_updated,
                  converted, error)

comdb2_sc_status

Information about current/most recent schema change per table.

comdb2_sc_status(name, type, newcsc2, start, status, seed, last_updated,
                 converted, error)

comdb2_views

List of views in the database.

comdb2_views(name, definition)

comdb2_memstats

Heap memory usage

comdb2_memstats(name, scope, total, used, unused, peak)