[Bug 21995] Request that reader feedback have ratings (specificly the averages) available via API [w/patch]
https://bugzilla.wikimedia.org/show_bug.cgi?id=21995 --- Comment #2 from Bawolff bawolff...@gmail.com 2010-01-25 15:03:22 UTC --- Runing explain on a test mediawiki db that has almost no data in it, i get (hopefully i got this query right): mysql describe SELECT SUM(rfh_total)/SUM(rfh_count) as avg, SUM(rfh_count) as count, rfh_tag, rfh_page_id from reader_feedback_history where rfh_page_id = 1 and rfh_date 200 GROUP BY rfh_page_id, rfh_tag\G *** 1. row *** id: 1 select_type: SIMPLE table: reader_feedback_history type: ref possible_keys: PRIMARY key: PRIMARY key_len: 4 ref: const rows: 6 Extra: Using where 1 row in set (0.00 sec) (Not sure if thats useful or not). As far as i can tell, with exception to the group by clause (in order to make it one query instead of 4), the query is the same as the one in getAverageRating -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are watching all bug changes. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 21995] Request that reader feedback have ratings (specificly the averages) available via API [w/patch]
https://bugzilla.wikimedia.org/show_bug.cgi?id=21995 --- Comment #3 from Roan Kattouw roan.katt...@gmail.com 2010-01-25 15:47:27 UTC --- I'm mostly worried about the case where $pageids contains multiple page IDs and the WHERE clause will look like WHERE rfh_page_id IN (1,2,3) AND rfh_date 200 -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are watching all bug changes. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 21995] Request that reader feedback have ratings (specificly the averages) available via API [w/patch]
https://bugzilla.wikimedia.org/show_bug.cgi?id=21995 --- Comment #4 from Bawolff bawolff...@gmail.com 2010-01-25 18:19:13 UTC --- That case definitly would happen - api.php?action=querygenerator=allpagesprop=ratinggaplimit=max would have 500 items in $pageids. Note, the specific use case on wikinews that i want this feature for would only deal with one article at a time. If the patch was re-written as a api.php?action=Readerfeedbacktitle=foo with title only being allowed to have a single page, would that be more acceptable efficiency wise? -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are watching all bug changes. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 21995] Request that reader feedback have ratings (specificly the averages) available via API [w/patch]
https://bugzilla.wikimedia.org/show_bug.cgi?id=21995 Roan Kattouw roan.katt...@gmail.com changed: What|Removed |Added CC||roan.katt...@gmail.com --- Comment #1 from Roan Kattouw roan.katt...@gmail.com 2010-01-02 12:04:16 UTC --- Patch looks OK, but from looking at it I think the DB query in the API module is less efficient than the one in getAverageRating(). I'll run an EXPLAIN on it later to see how bad it is. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l