Prepare for online Query