in reply to Out of memory!

Ignoring the other answers you've had, some of which contain some good advice, I'm still interested as to how you get out of memory with only 100 rows in each select. What is the type of the URLName column and how long is an average field? What versions of DBI and DBD::ODBC are you using?

Replies are listed 'Best First'.
Re^2: Out of memory!
by santhosh.yamsani (Initiate) on Aug 13, 2010 at 05:41 UTC

    For Suppose Urls in URLTable will be like

    1) www.google.com

    2) www.gmail.com

    3) www.gangster.com

    4) www.gorilla.com

    5) www.giraffe.com

    6) www.girstapache.com

    Urls in URL_Exclusion Table will be like

    1) www.g%

    2) www.gmaisds.%

    3) www.gmai%

    4) www.go%

    5) www.gir%

    6) www.girs%

    Like above i have Lakhs of URls.So I need to match exact Url for example say www.google.com matches with

    www.g% and www.go%

    So exact match is www.go%

    In this way i have to update ID column in URL table with the ExclusionId of URL_Exclusion Table

    For Example as i explained above: Id of www.google.com should be updated with the ExclusionId of www.go%

    But Why its Taking long time means- -"This comparision involves LIKE' operator which compares all other URLS in URL_Exclusion table"

      What are the column types in the database tables?

        There are two columns in each table

        URL Table:

        1) URLName (varchar)

        2) ID (int)

        URL_Exclusion Table:

        1) URLName_Exclusion (varchar) or RULE (varchar)

        2) EXID (int)

      I heard perl is a powerfull tool which can handle this type of scenarios.So i am approaching this way of copying urls into file and comparing urls and updating database using perl.

      But i am unable to move a step forward as i am getting OUT OF MEMORY! error

      Thanks for your previous responses