Closed (duplicate)
Project:
Localization server
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Nov 2008 at 11:02 UTC
Updated:
18 Jan 2010 at 12:44 UTC
Jump to comment: Most recent file
Comments
Comment #1
gábor hojtsyRight! Committed this patch to 6.x, thanks!
Comment #2
pvasili commentedexcellent, i have >140 000 lines in the table l10n_community_string.
Some queries use the "JOIN", but the data do not use :(.
Comment #3
gábor hojtsyWell, here is a quick look at all the use of this table in the queries in the module. From what I see most queries directly use some column from the table, others count values in this table, while the rest joins through this table to get translations for the given strings.
I agree that there are queries like the one before the last found, where the source table is not used but just joined through. Since the line table already has the sid, it seems unnecessary to join in the string table, so we can go directly to the translations. So instead of:
it would be:
Would be good to do a review of the above found queries and identify those that could be simplified. Marking active, since the above attached patch is committed, so no need to review it. Looking for a follow up patch.
Comment #4
pvasili commentedOK, next:
file: l10n_server/l10n_community/pages.inc
function: function l10n_community_get_string_count ( ) [469]
We need data from 2 tables (l10n_community_release, l10n_community_translation).
I think 3 tables is not needed in this query (l10n_community_file, l10n_community_line, l10n_community_string).
Comment #5
gábor hojtsyRe #4: how would you write a join to have both the pid (from the release table) and the is_suggestion (from the translation table) available, while you omit the middle tables? They allow us to get strings related to the relevant projects! As far as I see, the most we can drop here is the "_string" table.
Comment #6
gábor hojtsyThese queries were reviewed with great scrutiny while we introduced denormalization of project and release information and these inefficiencies are not there as far as I've seen. See #375817: Performance: denormalize releases, files and lines with project/release info