feat: use temporary table instead of large IN query in PilotAgentsDB - #8779
feat: use temporary table instead of large IN query in PilotAgentsDB#8779chaen wants to merge 2 commits into
Conversation
0469a7d to
c4d527e
Compare
c4d527e to
1a65ad7
Compare
|
I am not fully sure to understand what you are trying to solve exactly here, can you provide further details please? I assume it's because of: DIRAC/src/DIRAC/WorkloadManagementSystem/Agent/PilotStatusAgent.py Lines 85 to 98 in 42c75a1 If it's the case, I am wondering why we don't just simplify by having a |
|
the problem is the query itself. select * from Table where column in (1,2,3,4,...,126456464)is not efficient. On the other hand, this is very fast create temporary table tmp_table(column INT PRIMARY KEY);
insert into tmp_table (column) values (1),(2),(3),(4),...,(126456464);
select * from table t join temporary table tt on t.column = tt.column;Of course, it's for large number of values. |
This I understand, but it looks like the query itself could be avoided by returning the pilot info instead of just the pilot reference from |
BEGINRELEASENOTES
*WMS
CHANGE: use temporary table instead of large
INstatement in PilotAgentsDBENDRELEASENOTES