プロジェクト

全般

プロフィール

Vote #74929

完了

Export CSV with many custom field runs many queries

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Custom fields_14
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
14
version_id:
75
issue_org_id:
16091
author_id:
32550
assigned_to_id:
1
comments:
11
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
77
ステータス-->[Closed]

説明

Hello!

When exporting issues in CSV with lot of custom field (more than 20) it's very slow. We've made an audit and we have found there are many sql requests like that : (we use mysql)

@140127 16:38:49 2 Query SELECT issues.* FROM issues WHERE issues.id = 35006 LIMIT 1
2 Query SELECT issue_relations.* FROM issue_relations WHERE issue_relations.issue_from_id = 35007
2 Query SELECT issue_relations.* FROM issue_relations WHERE issue_relations.issue_to_id = 35007
2 Query SELECT custom_values.id AS t0_r0, custom_values.customized_type AS t0_r1, custom_values.customized_id AS t0_r2, custom_values.custom_field_id AS t0_r3, custom_values.value AS t0_r4, custom_fields.id AS t1_r0, custom_fields.type AS t1_r1, custom_fields.name AS t1_r2, custom_fields.field_format AS t1_r3, custom_fields.possible_values AS t1_r4, custom_fields.regexp AS t1_r5, custom_fields.min_length AS t1_r6, custom_fields.max_length AS t1_r7, custom_fields.is_required AS t1_r8, custom_fields.is_for_all AS t1_r9, custom_fields.is_filter AS t1_r10, custom_fields.position AS t1_r11, custom_fields.searchable AS t1_r12, custom_fields.default_value AS t1_r13, custom_fields.editable AS t1_r14, custom_fields.visible AS t1_r15, custom_fields.multiple AS t1_r16 FROM custom_values LEFT OUTER JOIN custom_fields ON custom_fields.id = custom_values.custom_field_id WHERE custom_values.customized_id = 35007 AND custom_values.customized_type = 'Issue' ORDER BY custom_fields.position@

NB : there are differences in sql requests used between using a filter with all columns with doing export on selected column and no filter and doing export on all columns...

Whe are about 5 minutes to export 3300 issues with 20 customs fields...


journals

Fixed in r12894.
--------------------------------------------------------------------------------
Nice !
thanks
--------------------------------------------------------------------------------
i applied patch but i still have thousand of sql requests like :

SELECT `issue_relations`.* FROM `issue_relations` WHERE `issue_relations`.`issue_from_id` = 31071
SELECT `issue_relations`.* FROM `issue_relations` WHERE `issue_relations`.`issue_to_id` = 31071
--------------------------------------------------------------------------------
This is fixed in r12910.
--------------------------------------------------------------------------------
FWIW, exporting 3000 issues to CSV with all columns (including custom fields and relations) now takes about 13s.
--------------------------------------------------------------------------------
Merged.
--------------------------------------------------------------------------------
i've applied patches r12910 & r12911 but it always takes more than 5min and i still have the thousands of sql requests...
--------------------------------------------------------------------------------
Johan Guilbaud wrote:
> i've applied patches 12910 & 12911 but it always takes more than 5min and i still have the thousands of sql requests...

no answer ???
--------------------------------------------------------------------------------
I'm still waiting for a response...

thanks.
--------------------------------------------------------------------------------
Johan Guilbaud wrote:
> I'm still waiting for a response...

This issue was closed with target version.
Please create a new issue if you have a problem in clean Redmine.

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,New,16638,Optimizing CSV export

Admin Redmine さんが3年以上前に更新

  • カテゴリCustom fields_14 にセット
  • 対象バージョン2.5.0_75 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0