Skip to content

Commit

Permalink
preventing query killer
Browse files Browse the repository at this point in the history
  • Loading branch information
volpino committed Aug 26, 2011
1 parent 605444e commit ec9000a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions python_scripts/get_gender_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ def get_data(start_date=None, output=sys.stdout, family="wikipedia"):

prev_server = ""
conn = None
user_count = "SELECT COUNT(*) FROM user"
user_count = "SELECT /* SLOW_OK */ COUNT(*) FROM user"
user_count_reg = "SELECT COUNT(*) FROM user WHERE user_registration > %s"
gender_count = """ SELECT up_value, COUNT(*)
FROM user_properties
WHERE up_property='gender'
GROUP BY up_value; """
gender_count_reg = """ SELECT up_value, COUNT(*)
gender_count_reg = """ SELECT /* SLOW_OK */ up_value, COUNT(*)
FROM user_properties JOIN user ON up_user=user_id
WHERE up_property='gender' AND
user_registration > %s
Expand Down
2 changes: 1 addition & 1 deletion python_scripts/get_users_gender.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

cursor = conn.cursor()
query = """
SELECT user_id, user_name, up_value
SELECT /* SLOW_OK */ user_id, user_name, up_value
FROM user
LEFT JOIN user_properties
ON up_user=user_id
Expand Down

0 comments on commit ec9000a

Please sign in to comment.