Look like problem lies with the Database Query. To
check run the query from SQL prompt and checkout the
time taken by the query(From ur explanation,seems
query is taking two minutes). If the query is taking
more time, then try indexing  where clause columns 


--- Divya <[EMAIL PROTECTED]> wrote:
>  
> 
> Hi All,
> 
>  
> 
> I am in a Perl based project, where we fire a query
> which returns 20K
> records.
> 
> In the perl side, we use the following snippet to
> get the query result to an
> array.
> 
>  
> 
> while (  @each_record = $stmt_handle->fetchrow)
> 
>   {
> 
> push @records, [ @each_record ] ;
> 
> }
> 
>  
> 
> Upon analysis, we found that
> "$stmt_handle->fetchrow"  is the one taking
> around 2 minutes. 
> 
>  
> 
> Below are the options we tried:
> 
> 1.    Used FOR loop instead of while loop: since while
> loop manipulates
> the boundary condition at every looping. 
> 2.    instead of fetch row we also tried
> $stmt_handle->fetchall_arrayref()
> , $stmt_handle->fetchrow_array() and
> $stmt_handle->fetchall_hashref(). Even
> didn't seem to help much. 
> 
>  
> 
> Has anybody come across, similar scenario. Is there
> any other way that will
> take less time to fetch the data and assign to an
> array. 
> 
> It would be helpful if you could come up with some
> alternate suggestions.
> 
> Please mail to my ID .
> 
>  
> 
> Thanks and Regards,
> 
> Divya
> 
>  
> 
> 

________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony

Reply via email to