From bfa5e5f51604c7edf63a7f1f0d3a0053f48c0470 Mon Sep 17 00:00:00 2001 From: Tsubasa SEKIGUCHI Date: Wed, 25 Mar 2026 05:51:19 +0000 Subject: [PATCH] =?UTF-8?q?GetStationsByLineGroupIdList=20RPC=E3=81=AE?= =?UTF-8?q?=E3=83=91=E3=83=95=E3=82=A9=E3=83=BC=E3=83=9E=E3=83=B3=E3=82=B9?= =?UTF-8?q?=E6=94=B9=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit update_station_vec_with_attributesのskip_types_joinをtrueに変更。 line_group_id=Noneで呼び出すため内部のtrain_type取得は常に空を返しており、 station_station_types/typesテーブルへのJOINは不要だった。 train_typeは後続のget_by_line_group_id_vecで別途取得済み。 これにより以下が改善される: - 2つのSQLクエリからstation_station_types/typesへの不要なJOINを削除 - バス停クエリがtokio::try_join!で他クエリと並列実行されるようになる Co-Authored-By: Claude Opus 4.6 (1M context) --- stationapi/src/use_case/interactor/query.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stationapi/src/use_case/interactor/query.rs b/stationapi/src/use_case/interactor/query.rs index 4a310f9d..931b0ad0 100644 --- a/stationapi/src/use_case/interactor/query.rs +++ b/stationapi/src/use_case/interactor/query.rs @@ -298,8 +298,9 @@ where .collect(); // lines, companies, station_numbers等を付与(train_typeはNoneで空になる) + // train_typeは後続のget_by_line_group_id_vecで取得するためJOIN不要 let mut stations = self - .update_station_vec_with_attributes(stations, None, transport_type, false) + .update_station_vec_with_attributes(stations, None, transport_type, true) .await?; // 複数line_group_idの列車種別を一括取得してセット