To set the timeout for queries in the database, select Connection - Timeout for database... from the menu. In the window as shown below enter the timeout in seconds. The default value is 30 seconds. A value of 0 means infinite.