1. A system for executing database queries, comprising: a computer system including at least one processor configured to: select a column of a first table as a candidate column for creating a dictionary; create tokens for a foreign key in a second table that corresponds to a primary key in the first table, each of the created tokens being a respective compression symbol; generate the dictionary for the selected column using the created tokens as indexes in the dictionary; and modify a query that accesses the column of the first table using a join between the first table and the second table by rewriting the query to eliminate the join by retrieving column values based on using the created tokens for the foreign key in the second table as the indexes into the dictionary to directly obtain from the dictionary one or more values corresponding to one or more column values in the first table.