<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>9651</bug_id>
          
          <creation_ts>2016-05-17 22:22:13 +0000</creation_ts>
          <short_desc>Error report web: Optimize searching times</short_desc>
          <delta_ts>2026-04-23 15:01:04 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>Error Reporting tool</product>
          <component>Error Reporting Tool</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>Future</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Aníbal Limón">anibal.limon</reporter>
          <assigned_to name="Tim Orling">tim.orling</assigned_to>
          <cc>belen.barros.pena</cc>
    
    <cc>benjamin.esquivel</cc>
    
    <cc>changqing.li</cc>
    
    <cc>juan.m.cruz.alcaraz</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>tim.orling</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>62272</commentid>
    <comment_count>0</comment_count>
    <who name="Aníbal Limón">anibal.limon</who>
    <bug_when>2016-05-17 22:22:13 +0000</bug_when>
    <thetext>When you made a search in error report web it takes too much ~1 minute depending on the search.

This is because the tool is searching over the log without an index [1], currently MySQL supports Full Text Search but Django ORM didn&apos;t expose directly.

The work is to create an full text search index for the log field and modify error report web code to use a custom MySQL query when MySQL is available.

[1] http://git.yoctoproject.org/cgit/cgit.cgi/error-report-web/tree/Post/views.py#n202</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62325</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2016-05-19 14:52:28 +0000</bug_when>
    <thetext>We did tweak some things like the link used from the autobuilder so its no longer a full text search but just searching for specific revisions. Does that help your usecase or not? We&apos;re struggling to figure out the priority of this without knowing what usecases its impacting. If there is a significant impact we could make it a Medium+. We could also assign to someone on the GDC team, depending on how Michael and GDC want to handle this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62326</commentid>
    <comment_count>2</comment_count>
    <who name="Aníbal Limón">anibal.limon</who>
    <bug_when>2016-05-19 14:57:04 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; We did tweak some things like the link used from the autobuilder so its no
&gt; longer a full text search but just searching for specific revisions. Does
&gt; that help your usecase or not? We&apos;re struggling to figure out the priority
&gt; of this without knowing what usecases its impacting. If there is a
&gt; significant impact we could make it a Medium+. We could also assign to
&gt; someone on the GDC team, depending on how Michael and GDC want to handle
&gt; this.

We can workaround the search over log using only the link from auto builder for access the failures also using specific revisions but this not solve the current searching problem if the search functionality isn&apos;t needed may be is better to remove it instead of leave as is and only using specific revisions and AB link.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62350</commentid>
    <comment_count>3</comment_count>
      <attachid>3182</attachid>
    <who name="Aníbal Limón">anibal.limon</who>
    <bug_when>2016-05-19 20:11:58 +0000</bug_when>
    <thetext>Created attachment 3182
mysql slow query log

When did a search of smart, in the current db.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62351</commentid>
    <comment_count>4</comment_count>
    <who name="Aníbal Limón">anibal.limon</who>
    <bug_when>2016-05-19 20:36:11 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; Created attachment 3182 [details]
&gt; mysql slow query log
&gt; 
&gt; When did a search of smart, in the current db.

As summary the query took 440s,

# Query_time: 440.112315  Lock_time: 0.000082  Rows_sent: 1  Rows_examined: 79488</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62354</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Wood">michael.g.wood</who>
    <bug_when>2016-05-19 21:57:49 +0000</bug_when>
    <thetext>Fine to take this bug, pretty easy to implement. Note that we already have a bug #6541 to improve the search on the UI side which may help where people haven&apos;t discovered out how to do the correct query.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66940</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Wood">michael.g.wood</who>
    <bug_when>2016-10-05 14:53:42 +0000</bug_when>
    <thetext>We would need to special case when the backend database selection is mysql and create a full text index on the log field. We would also need to check which backend database is in use to be able to switch between the querying method.

https://docs.djangoproject.com/en/1.8/ref/models/querysets/#search</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92901</commentid>
    <comment_count>7</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2022-03-31 15:08:21 +0000</bug_when>
    <thetext>Still slow...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105227</commentid>
    <comment_count>8</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2026-04-23 15:01:04 +0000</bug_when>
    <thetext>Still valid.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>3182</attachid>
            <date>2016-05-19 20:11:58 +0000</date>
            <delta_ts>2016-05-19 20:11:58 +0000</delta_ts>
            <desc>mysql slow query log</desc>
            <filename>mariadb-slow.log</filename>
            <type>text/plain</type>
            <size>1470</size>
            <attacher name="Aníbal Limón">anibal.limon</attacher>
            
              <data encoding="base64">L3Vzci9zYmluL215c3FsZCwgVmVyc2lvbjogMTAuMS4xNC1NYXJpYURCLTF+amVzc2llIChtY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