Hi, What is taking the time? The query or the iteration?
If you are only interested in field id 1 and 8, you can do this very fast with two non-object-oriented. my $qual = ars_LoadQualifier($ctrl, $form, "'Category' = \"AWS\" AND 'Type' = \"Subway > 2.0\" AND 'Item' = \"Operations\" AND 'Case ID+'=\"0003044848\""); die $ars_errstr if $ars_errstr; my %el = ars_GetListEntry($ctrl, $form, $qual, 0, 0, [{columnWidth=>128, separator=>'', 8 }]); die $ars_errstr if $ars_errstr; foreach my $eid (keys %el) { my $descr = $el{$eid}; print "Field: " . $eid . "\n"; print "Field: " . $descr . "\n"; } Best Regards - Misi, RRR AB, http://www.rrr.se > On 16/04/07, Deepak Parasam <[EMAIL PROTECTED]> wrote: >> My intention of using ARS perl was to query remedy to get tickets status >> (updates), in near real-time. >> >> Here's a snippet: >> >> use ARS; >> ... >> $f = $c -> openForm ('HPD:HelpDesk'); >> >> @e = $f -> query (-query => "'Category' = \"AWS\" AND 'Type' = \"Subway >> 2.0\" AND 'Item' = \"Operations\" AND 'Case ID+'=\"0003044848\""); >> print "Iterating...\n"; >> foreach (@e){ >> @arr = $f -> get (-entry => $_, -fields => [1, 8]); >> foreach $field (@arr){ >> print "Field: " . $field . "\n"; >> } >> } >> >> --- Though this works, it takes about 15 minutes (on an average) to >> complete execution. Bulk of this time goes in opening the form. >> When I ran strace, I could see that there were lots of poll calls, >> reads, and writes to the remedy server (remedy-1). >> >> Any ideas to improve the performance ?! > > Hi Deepak, > > just a shot from the hip -- but are the fields you base your query > on indexed (i.e. "Category", "Type" and "Item")? Does the same query > from within aruser the same time? Probably this is not a problem with > ARSperl at all... > > > -- > Michael > > "Microwave oven? Whaddya mean, it's a microwave oven? I've been > watching Channel 4 on the thing for two weeks." > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Arsperl-users mailing list > Arsperl-users@arsperl.org > https://lists.sourceforge.net/lists/listinfo/arsperl-users > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Arsperl-users mailing list Arsperl-users@arsperl.org https://lists.sourceforge.net/lists/listinfo/arsperl-users