in reply to Comparing DBI records

The Database's native search will always be faster than anything you build on top of it.

Couldn't you just use a SELECT statement with the column names and values you are looking for ?

Leave query optimization/performance issues with the DBA.

             Most people believe that if it ain't broke, don't fix it.
        Engineers believe that if it ain't broke, it doesn't have enough features yet.

Replies are listed 'Best First'.
Re^2: Comparing DBI records
by CountZero (Bishop) on Feb 19, 2013 at 06:29 UTC
    I had a similar issue and solved it by using Array::Compare.

    I grab the data from both databases as an arrayref, making sure the sequence of the fields is the same in both queries and then I throw the arrayrefs to the comparator of Array::Compare.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics
Re^2: Comparing DBI records
by parser (Acolyte) on Feb 19, 2013 at 16:44 UTC
    That would be my first choice. I am a Perl developer by choice and a SQL user by necessity. I spent 5 hours last night with my head buried in a SQL book (re)learning all about left and outer joins, etc.

    I have not yet figured out how to leverage the power of SQL to perform this trick.