Skip to content

Instantly share code, notes, and snippets.

View tomatolog's full-sized avatar

Stas tomatolog

View GitHub Profile
src/searchd.cpp | 49 +++++++++++++++++++++++++++++++++++--------------
1 file changed, 35 insertions(+), 14 deletions(-)
diff --git a/src/searchd.cpp b/src/searchd.cpp
index ab2d09d..2af6fe0 100644
--- a/src/searchd.cpp
+++ b/src/searchd.cpp
@@ -9854,9 +9854,11 @@ bool SearchHandler_c::RunLocalSearch ( int iLocal, ISphMatchSorter ** ppSorters,
const int iQueries = m_iEnd-m_iStart+1;
30e331c673e21f4c7a9b89879342fa6de313c070
src/sphinx.h | 2 ++
src/sphinxrt.cpp | 10 ++++++++--
src/sphinxutils.cpp | 4 +++-
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/src/sphinx.h b/src/sphinx.h
index de31f91..e016128 100644
--- a/src/sphinx.h
+++ b/src/sphinx.h
m_tChunkLock.ReadLock ();
bool bGotID = ARRAY_ANY ( bGotID, m_dRamChunks, ( m_dRamChunks[_any]->FindAliveRow ( tDoc.m_uDocID )!=NULL ) );
0000000140103B65 40 32 F6 xor sil,sil
0000000140103B68 33 DB xor ebx,ebx
0000000140103B6A 44 8B AF C0 03 00 00 mov r13d,dword ptr [rdi+3C0h]
0000000140103B71 45 85 ED test r13d,r13d
0000000140103B74 7E 61 jle RtIndex_t::AddDocument+127h (140103BD7h)
{
m_tChunkLock.ReadLock ();
0000000140103B76 45 33 F6 xor r14d,r14d
const T * BinarySearch ( T tRef ) const
{
return sphBinarySearch ( m_pData, m_pData+m_iSize-1, tRef );
00000001401059F0 4C 8B 01 mov r8,qword ptr [rcx]
00000001401059F3 4C 63 51 08 movsxd r10,dword ptr [rcx+8]
00000001401059F7 4C 8B CA mov r9,rdx
00000001401059FA 49 FF CA dec r10
00000001401059FD 4F 8D 14 D0 lea r10,[r8+r10*8]
0000000140105A01 4D 85 C0 test r8,r8
0000000140105A04 74 62 je CSphFixedVector<unsigned __int64>::BinarySearch+78h (140105A68h)
@tomatolog
tomatolog / egora server.md
Last active August 29, 2015 14:13
egora mc server
50ms > query > 80ms
/* Wed Oct 1 15:10:53.507 2014 conn 9 real 0.066 wall 0.066 found 21369 */ SELECT * , MIN(modification_start_year) AS group_start_year, MAX(modification_end_year) AS group_end_year, MIN(price) AS group_min_price, MAX(price) AS group_max_price, COUNT(*) as group_city_count, COUNT(*) as group_all_count, ( IF(seller=4, 1, 0) - IF(seller=3, 1, 0) + IF(photo, 10, 0) + IF(state<2, 5, 0) + IF(custom<2, 5, 0) + IF(availability=1, 5, 0) + IF(warranty=1, 5, 0) + IF(section_id = 2, 10, IF(owners_number<=2, 5, 0)) + IF(year>=2009, 5, 0) - IF(is_suspect_photo, 9, 0) ) AS rank_expr , (IF(seller=4, 1, 0)) AS dealer_rank_expr, GROUP_CONCAT(id) AS ids FROM all WHERE modification_default=0 AND folder_id!=0 AND status
/* Tue Sep 30 23:21:37.454 2014 conn 168 real 0.981 wall 0.981 found 47390 */ SELECT * , MIN(modification_start_year) AS group_start_year, MAX(modification_end_year) AS group_end_year, MIN(price) AS group_min_price, MAX(price) AS group_max_price, COUNT(*) as group_city_count, COUNT(*) as group_all_count, ( IF(seller=4, 1, 0) - IF(seller=3, 1, 0) + IF(photo, 10, 0) + IF(state<2, 5, 0) + IF(custom<2, 5, 0) + IF(availability=1, 5, 0) + IF(warranty=1, 5, 0) + IF(section_id = 2, 10, IF(owners_number<=2, 5, 0)) + IF(year>=2009, 5, 0) - IF(is_suspect_photo, 9, 0) ) AS rank_expr , (IF(seller=4, 1, 0)) AS dealer_rank_expr, GROUP_CONCAT(id) AS ids FROM all WHERE modification_default=0 AND folder_id!=0 AND status IN (0,8,9) AND ex
<pre>
all dist=0 (default)
20 threads, 23590 queries 428.9 qps load average: 14.37
30 threads, 23796 queries 432.6 qps load average: 22.50
100 threads, 23212 queries 422.0 qps load average: 62.82
all7 dist=0 (same as all)
20 threads, 18136 queries 329.7 qps load average: 14.79
30 threads, 18055 queries 328.2 qps load average: 21.99
100 threads, 18366 queries 333.9 qps load average: 78.16
all dist=0 (default)
20 threads, 23590 queries 428.9 qps load average: 14.37
30 threads, 23796 queries 432.6 qps load average: 22.50
100 threads, 23212 queries 422.0 qps load average: 62.82
all7 dist=0 (same as all)
20 threads, 18136 queries 329.7 qps load average: 14.79
30 threads, 18055 queries 328.2 qps load average: 21.99
100 threads, 18366 queries 333.9 qps load average: 78.16
[Wed Feb 5 21:26:01.874 2014] [17477] CutWorst uniq.len=226135(239014)
[Wed Feb 5 21:26:02.083 2014] [17477] CutWorst uniq.len=344601(355839)
[Wed Feb 5 21:26:02.346 2014] [17477] CutWorst uniq.len=406859(417260)
[Wed Feb 5 21:26:02.637 2014] [17477] CutWorst uniq.len=505261(517737)
[Wed Feb 5 21:26:03.009 2014] [17477] CutWorst uniq.len=661641(677210)
[Wed Feb 5 21:26:03.417 2014] [17477] CutWorst uniq.len=749077(759717)
[Wed Feb 5 21:26:03.838 2014] [17477] CutWorst uniq.len=815751(826790)
[Wed Feb 5 21:26:04.306 2014] [17477] CutWorst uniq.len=899294(910487)
[Wed Feb 5 21:26:04.819 2014] [17477] CutWorst uniq.len=973393(982360)
[Wed Feb 5 21:26:05.340 2014] [17477] CutWorst uniq.len=1019143(1029491)