On Thu, 13 Feb 2020 06:58:37 +0000
JohnD Blackburn <johnd.blackb...@au.abb.com> wrote:

> The DBA pulled info from some cache that showed the SQL statement
> from the script was executed 12610 times.
> 
> So if I were to add an “or die $!” statement after the
> fetchrow_array(), that might fix things?  (or prevent it from trying
> to continue if there are errors?) Or catch errors after the execute
> statement?

Q: What are you really trying to accomplish?

Basic rules:

If you need to run SQL more than once parepare it.

If you are not sure how well it runs then you can evaluate it
beorehand -- which also spots errors, can help track down un-used
indexes.

As noted, generating a single query, preparing and running once,
then extracting the rows (preferably as arrays rather than hashes)
will be the most effecient way.

The database is going to do a much better job filtering anything it
can locally in native format beore you convert it to ASCII char 
strings and pull the same content across a LAN.



-- 
Steven Lembark                                        3646 Flora Place
Workhorse Computing                                St. Louis, MO 63110
lemb...@wrkhors.com                                    +1 888 359 3508

Reply via email to