I hava an ArrayList that got filled from an SQL query and contains all the rows of a table.
If I want a subset of this ArrayList (say WHERE column1 = x)
Is it faster to remake an SQL connection and fetch a query with this condition, or loop through the arraylist and filter the data ? (considering an arraylist of 1000 rows)
If the loop through the arraylist is faster, until what size is it still appliable ?
Thank you