Beispiel #1
0
def get_diffs_forstatdata():
    return [
        diff("calls"),
        diff("total_time").label("runtime"),
        diff("shared_blks_read"),
        diff("shared_blks_hit"),
        diff("shared_blks_dirtied"),
        diff("shared_blks_written"),
        diff("temp_blks_read"),
        diff("temp_blks_written"),
        diff("blk_read_time"),
        diff("blk_write_time")
    ]
Beispiel #2
0
def powa_getwaitdata_db():
    base_query = powa_base_waitdata_db()

    return (select([
        column("dbid"),
        column("event_type"),
        column("event"),
        diff("count")
    ])
        .select_from(base_query)
        .group_by(column("dbid"), column("event_type"), column("event"))
        .having(max(column("count")) - min(column("count")) > 0))
Beispiel #3
0
def get_diffs_forstatdata():
    return [
        diff("calls"),
        diff("total_plan_time").label("plantime"),
        diff("total_exec_time").label("runtime"),
        diff("shared_blks_read"),
        diff("shared_blks_hit"),
        diff("shared_blks_dirtied"),
        diff("shared_blks_written"),
        diff("temp_blks_read"),
        diff("temp_blks_written"),
        diff("blk_read_time"),
        diff("blk_write_time"),
        diff("wal_records"),
        diff("wal_fpi"),
        diff("wal_bytes")
    ]