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)))
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)))
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)))