I am wondering which method would be better for processing a large amounts of records in a texis database.
Method 1
<sql select item1, item2 from table1>
<sql select item3 from table2 where id like item1 and host like item2>
Does something with item3 that also requires a sql insert
</sql>
</sql>
Method 2
<sql select item1, item2 from table1></sql>
<loop $item1 $item2>
<sql select item3 from table2 where id like item1 and host like item2>
Do something with item3 that also requires a sql insert
</sql>
</loop>
Method 3
Modify either method 1 or method 2 to use MAX and SKIP values in the SQL statements so I am only processing a few records at a time. I know a lot of this deals with how much memory and the processor speed of the box I am working on but I am looking for some general rules of thumb.
Method 1
<sql select item1, item2 from table1>
<sql select item3 from table2 where id like item1 and host like item2>
Does something with item3 that also requires a sql insert
</sql>
</sql>
Method 2
<sql select item1, item2 from table1></sql>
<loop $item1 $item2>
<sql select item3 from table2 where id like item1 and host like item2>
Do something with item3 that also requires a sql insert
</sql>
</loop>
Method 3
Modify either method 1 or method 2 to use MAX and SKIP values in the SQL statements so I am only processing a few records at a time. I know a lot of this deals with how much memory and the processor speed of the box I am working on but I am looking for some general rules of thumb.