Просмотр исходного кода

fix: fixed postlimit attribute eval in joined tables; updated final columnar/docstore eval threshold to improve performance

Ilya Kuznetsov 1 неделя назад
Родитель
Сommit
090feb9aa8
3 измененных файлов с 6 добавлено и 2 удалено
  1. 2 2
      src/queuecreator.cpp
  2. 0 0
      test/test_279/model.bin
  3. 4 0
      test/test_279/test.xml

+ 2 - 2
src/queuecreator.cpp

@@ -2519,7 +2519,7 @@ bool QueueCreator_c::ConvertColumnarToDocstore()
 
 	// try to guess the implicit cutoff (no sorters yet)
 	int iCutoff = ApplyImplicitCutoff ( m_tQuery, {}, !m_tQuery.m_pQueryParser->IsFullscan(m_tQuery) );
-	bool bEvalAllInFinal = iCutoff>=0 && iCutoff<=m_tQuery.m_iLimit;
+	bool bEvalAllInFinal = ( iCutoff>=0 && iCutoff<=m_tQuery.m_iLimit ) || ( m_tQuery.m_iLimit==m_tQuery.m_iMaxMatches );
 
 	// check for columnar attributes that have FINAL eval stage
 	// if we have more than 1 of such attributes (and they are also stored), we replace columnar expressions with columnar expressions
@@ -2540,7 +2540,7 @@ bool QueueCreator_c::ConvertColumnarToDocstore()
 		}
 	}
 
-	const int MIN_FINAL_THRESH = 2;
+	const int MIN_FINAL_THRESH = 10;
 	if ( dStoredColumnarFinal.GetLength()>MIN_FINAL_THRESH )
 		for ( auto i : dStoredColumnarFinal )
 		{

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
test/test_279/model.bin


+ 4 - 0
test/test_279/test.xml

@@ -31,6 +31,10 @@ INSERT INTO orders (id, user_id, name, description, price, order_date, attr, reg
 
 SELECT id, name FROM users INNER JOIN orders ON users.id=orders.user_id ORDER BY orders.id ASC;
 
+flush ramchunk users;
+flush ramchunk orders;
+SELECT * FROM users LEFT JOIN orders ON users.id=orders.user_id ORDER BY orders.id ASC;
+
 DROP TABLE users;
 DROP TABLE orders;
 

Некоторые файлы не были показаны из-за большого количества измененных файлов