View Issue Details

IDProjectCategoryView StatusLast Update
0000005NOALYSSImprove Usepublic2013-11-12 10:03
Reporterdanydb Assigned Todanydb  
PrioritynormaleSeveritymineurReproducibilityquelques fois
Status ferméResolutioncorrigé 
Product Version5.2 
Target Version5.3Fixed in Version5.3 
Summary0000005: Amélioration performance recherche de fiches
DescriptionDans ajax_card, on appele fiche::build_sql dans laquelle on fait une query avec vw_fiche_attr mais quand le nombre de fiches est important cela prend vraiment longtemps pour avoir une réponse, il faudrait améliorer cela, de la même façon que dans la r3642 en utilisant un prepare

/* create a filter based on j */
/*$sql_str="select f_id, vw_name,quick_code,vw_description ".
" from vw_fiche_attr where ".
" ( vw_name ilike '%'||$1||'%' or quick_code ilike $2||'%' or vw_description ilike '%'||$3||'%') ".
$filter_card;
*/

$sql_str="select distinct f_id from fiche join jnt_fic_att_value using (f_id) join attr_value using(jft_id) where ad_id in (9,1,23) and av_text ilike '%'||$1||'%' ".$filter_card;

$sql=$cn->get_array($sql_str ,array($_REQUEST['FID']));

if (sizeof($sql) != 0 ) {
echo "
    ";
    $sql_get=$cn->prepare('get_name',"select av_text from jnt_fic_att_value join attr_value using (jft_id) where f_id = $1 and ad_id=$2");

    for ($i =0;$i<12 && $i < count($sql) ;$i++) {
    $name='';$quick_code='';$desc='';

    $sql_name=$cn->execute('get_name',array($sql[$i]['f_id'],1));
    if ( Database::num_row($sql_name) == 1) $name=Database::fetch_result($sql_name,0,0);

    $sql_name=$cn->execute('get_name',array($sql[$i]['f_id'],9));
    if ( Database::num_row($sql_name) == 1) $desc=Database::fetch_result($sql_name,0,0);

    $sql_name=$cn->execute('get_name',array($sql[$i]['f_id'],23));
    if (Database::num_row($sql_name) == 1) $quick_code=Database::fetch_result($sql_name,0,0);


    /* Highlight the found pattern with bold format */
    $name=str_ireplace($_REQUEST['FID'],''.$_REQUEST['FID'].'',h($name));
    $qcode=str_ireplace($_REQUEST['FID'],''.$_REQUEST['FID'].'',h($quick_code));
    $desc=str_ireplace($_REQUEST['FID'],''.$_REQUEST['FID'].'',h($desc));
    printf('<li id="%s">%s <span class="informal"> %s %s</span>',
    $quick_code,
    $quick_code,
    $name,
    $desc
    );
    }
Additional InformationUtilisé uniquement dans ajax_card. La partie

(vw_name ilike '%$query%' or quick_code ilike ('%$query%') or vw_description ilike '%$query%' or tva_num ilike '%$query%')";


doit être déplacée dans ajax_card car trop lente.
TagsNo tags attached.
Extension Noalyss

Relationships

related to 0000117 closeddanydb la table attr_value ne sert a rien 

Activities

danydb

2010-10-30 02:04

administrator   ~0000228

Amélioration grâce à 117

danydb

2013-05-06 20:57

administrator   ~0001808

Fix committed to phpcompta branch. revision 3737
Date 2010-10-30 14:07:07
message Am?\195?\169lioration de l'apparence des montants dans impression
task 0000005 : am?\195?\169lioration des performances pour la recherche de fiche
repository PhpCompta WebSVN
id 19402

danydb

2013-11-10 22:56

administrator   ~0002148

Fix committed to /phpcompta/trunk/ branch. revision 3737
Date 2010-10-30 14:07:07
message Am?\195?\169lioration de l'apparence des montants dans impression
task 0000005 : am?\195?\169lioration des performances pour la recherche de fiche
repository PhpCompta WebSVN
id 25514

danydb

2013-11-12 10:03

administrator   ~0002242

reopened by websvn

Issue History

Date Modified Username Field Change
2010-09-21 13:41 danydb New Issue
2010-09-21 13:41 danydb Status new => assigned
2010-09-21 13:41 danydb Assigned To => danydb
2010-10-30 02:04 danydb Relationship added related to 0000117
2010-10-30 02:04 danydb Note Added: 0000228
2010-10-30 02:04 danydb Status assigned => resolved
2010-10-30 02:04 danydb Fixed in Version => Next Release
2010-10-30 02:04 danydb Resolution open => fixed
2010-12-21 16:53 danydb Fixed in Version Next Release => 5.3
2010-12-21 16:53 danydb Target Version Next Release => 5.3
2011-03-05 17:33 danydb Status resolved => closed
2011-06-24 14:18 danydb Category Dev => Improve Use
2013-05-06 20:57 danydb Source_changeset_attached => PhpCompta WebSVN phpcompta r3728
2013-05-06 20:57 danydb Source_changeset_attached => PhpCompta WebSVN phpcompta r3730
2013-05-06 20:57 danydb Source_changeset_attached => PhpCompta WebSVN phpcompta r3731
2013-05-06 20:57 danydb Source_changeset_attached => PhpCompta WebSVN phpcompta r3732
2013-05-06 20:57 danydb Source_changeset_attached => PhpCompta WebSVN phpcompta r3737
2013-05-06 20:57 danydb Note Added: 0001808
2013-11-10 22:56 danydb Source_changeset_attached => PhpCompta WebSVN /phpcompta/trunk/ r3728
2013-11-10 22:56 danydb Source_changeset_attached => PhpCompta WebSVN /phpcompta/trunk/ r3730
2013-11-10 22:56 danydb Source_changeset_attached => PhpCompta WebSVN /phpcompta/trunk/ r3731
2013-11-10 22:56 danydb Source_changeset_attached => PhpCompta WebSVN /phpcompta/trunk/ r3732
2013-11-10 22:56 danydb Source_changeset_attached => PhpCompta WebSVN /phpcompta/trunk/ r3737
2013-11-10 22:56 danydb Note Added: 0002148
2013-11-10 22:56 danydb Status closed => confirmed
2013-11-12 10:03 danydb Note Added: 0002242
2013-11-12 10:03 danydb Status confirmed => closed