in reply to Re^3: how to speed up querys to mysql
in thread how to speed up querys to mysql

thx for your answers. I need all results where $row == $row1, so "LAST" method dont helps. also the @c1 and @c2 arrays comes not from mysql queries but from files , which i parsed before. and of coursed my script checks for the same queries.

Replies are listed 'Best First'.
Re^5: how to speed up querys to mysql
by Melly (Chaplain) on Oct 19, 2006 at 20:11 UTC

    Then have you thought about using an "in" structure - mssql at least is suprisingly efficient, even when given huge lists - e.g. (cut-down, and untested)

    my $list = join ",", @a1; foreach(@b1){ $sql = "select x from y where v = $_ and z in($list)"; print $sql . "\n"; }
    Tom Melly, tom@tomandlu.co.uk