示例#1
0
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
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)))