Skip to content

Commit bba26fc

Browse files
committed
Simplify the MySQL query for health check to reduce data transfer
1 parent 18b9d82 commit bba26fc

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

cohd/query_cohd_mysql.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,8 +1437,9 @@ def health():
14371437
cur = conn.cursor()
14381438

14391439
try:
1440-
sql = '''SELECT *
1441-
FROM cohd.dataset;'''
1440+
sql = '''SELECT dataset_id
1441+
FROM cohd.dataset
1442+
LIMIT 1;'''
14421443
cur.execute(sql)
14431444
datasets = cur.fetchall()
14441445
healthy = len(datasets) > 0

0 commit comments

Comments
 (0)