Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Big database queries

by screamingeagle (Curate)
on Aug 30, 2002 at 05:27 UTC ( #194007=note: print w/replies, xml ) Need Help??


in reply to Big database queries

i'd suggest using a stored procedure. for one, the SQL in the stored procedure is precompiled, thus avoiding the need for the database to parse the query and create an execution plan every single time; secondly, since all the processing is done on the database, you could return back only the filtered results, thus cutting down on network traffic between the database server and the client machine....
i'd also suggest using recordset paging techniques so that u only need to show 20-25 records to the user at a time , and provide "PREVIOUS" and "NEXT" buttons. this way, u dont have to fetch millions of records , just 25 records at a time....that should help.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://194007]
help
Chatterbox?
[jdporter]: It doesn't have to be line by line. Just "my program" "writes" to the external prog and also/then "reads" from it.
LanX open (You are not allowed to open to a command that pipes both in and out, but see IPC::Open2, IPC::Open3, and Bidirectional Communication with Another Process in perlipc for alternatives.)
[jdporter]: IPC::Open2, I guess
[jdporter]: yes, that
[pryrt]: 1nickt: academically, perl -MDevel::Peek -lE 'Dump(42); Dump(42.0)'
[chacham]: have you ever wanted to vote -- on a post because of the signature?

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (12)
As of 2017-05-24 20:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?