コード例 #1
0
ファイル: reportdata.py プロジェクト: zloader/PGObserver
def getBloatedIndexesForHostname(uishortname, order_by=False, limit=50):
    sql = """
    SELECT * FROM zz_utils.get_bloated_indexes(%s, %s)
    """
    host = hosts.getHostsDataForConnectingByUIShortname(uishortname)[0]
    return datadb.executeOnHost(
        host['host_name'], host['host_port'], host['host_db'],
        host['host_user'], host['host_password'], sql,
        (True if order_by == 'bloat_factor' else False, int(limit)))
コード例 #2
0
def getBloatedTablesForHostname(hostname, order_by='wasted_bytes', limit=50):
    sql = """
    SELECT * FROM zz_utils.get_bloated_tables(%s, %s)
    """
    host = hosts.getHostsDataForConnecting(hostname)[0]
    return datadb.executeOnHost(
        hostname, host['host_port'], host['host_db'], host['host_user'],
        host['host_password'], sql,
        (True if order_by == 'bloat_factor' else False, int(limit)))
コード例 #3
0
ファイル: reportdata.py プロジェクト: etel/PGObserver
def getBloatedIndexesForHostname(hostname, order_by=False, limit=50):
    sql = """
    SELECT * FROM zz_utils.get_bloated_indexes(%s, %s)
    """
    host = hosts.getHostsDataForConnecting(hostname)[0]
    return datadb.executeOnHost(hostname, host['host_port'], host['host_db'], host['host_user'], host['host_password'], sql, (True if order_by == 'bloat_factor' else False, int(limit)))