Methods, computer program products, and systems are presented. The method computer program products, and systems can include, for instance: identifying an invoked database query for execution on a database, the invoked database query being associated to a user; generating an execution plan for executing the database query on the database; wherein the generating the execution plan for execution of the database query on the database includes establishing an ordering of first and second tables, the ordering of the first and second tables being in dependence on an access privilege attribute of the user in respect to the first table; and executing the database query according to the execution plan.