Disclosed aspects relate to query hint learning in a database management system. A hint in a first query is detected by the database management system. The first query has a first signature. A second query is received by the database management system. The second query has a second signature. A determination is made by the database management system that the second signature correlates with the first signature. A query plan is established by the database management system. The query plan is based on the second query and uses the hint in the first query. In response to receiving the second query, the database management system processes the query plan.