- * @param string|array $tables Table names, see Database::select
- * @param string|array $fields Fields used in query, see Database::select
- * @param string|array $conds Conditions used in query, see Database::select
- * @param array $join_conds Join conditions, see Database::select
- * @param array $options Options, see Database::select
- * @param bool|string $filter_tag Tag to select on
+ * WARNING: If $filter_tag contains more than one tag, this function will add DISTINCT,
+ * which may cause performance problems for your query unless you put the ID field of your
+ * table at the end of the ORDER BY, and set a GROUP BY equal to the ORDER BY. For example,
+ * if you had ORDER BY foo_timestamp DESC, you will now need GROUP BY foo_timestamp, foo_id
+ * ORDER BY foo_timestamp DESC, foo_id DESC.
+ *
+ * @param string|array &$tables Table names, see Database::select
+ * @param string|array &$fields Fields used in query, see Database::select
+ * @param string|array &$conds Conditions used in query, see Database::select
+ * @param array &$join_conds Join conditions, see Database::select
+ * @param string|array &$options Options, see Database::select
+ * @param string|array $filter_tag Tag(s) to select on