I have some cache tables that I treat as temporary tables and run a lock on to avoid more than one user attempting to load to the table at once. They're only used for the rare import from xls command, but I dont know how I would manage it with a query.