Patent attributes
A database query to be run against a database is received by a processor. The query includes a query predicate. The query predicate includes a condition. The condition applies to a single database table. The condition is parsed to create an input vector. The input vector is submitted to a neural network. The neural network is trained to calculate the selectivity, a number of unique values (NUV) of results of applying predicates to the single database table, and a high mode frequency (HMF) of results of applying predicates to the single database table. The neural network determines the selectivity of the query predicate, an NUV for each column in the result of applying the query predicate to the single database table, and an HMF for each column in the result of applying the query predicate to the single database table.