I am working on a trade's appointments agenda. The question is that what is better. When application initialize, dump data from database to an ArrayList and iterate over ArrayList whenever that I want appointments of a day OR execute one query everytime that I want appointments of a day? The database is on localhost.
Java querys are PreparedStatement.
I ask this because when appointments will increase, Iterate over ArrayList is going to be less and less efficient.