A computer-implemented method for efficient calculation of sets of distinct results in an information retrieval service, the method comprising: receiving a query from a client application to retrieve data from a database comprising a plurality of database tables, the query having a plurality of requested attributes and one or more conditions; characterized by listing the same row identifiers in each of the plurality of database tables for a result set that matches the one or more conditions; for each of the row identifiers, calculating a tuple of value identifiers having an entry for each of the plurality of requested attributes; before projection, calculating for each database table of the plurality of database tables comprising one or more of the plurality of requested attributes and for each of the row identifiers in each said database table a unique number, wherein the row identifiers are assigned a unique number for each distinct combination of value identifiers using a hashing algorithm so that row identifiers having exactly the same combination of value identifiers for the requested plurality of attributes receive the same unique number, wherein the calculating is performed for each database table of the plurality of database tables separately and in parallel; generating a list of the row identifiers mapped with the unique numbers; during the projection, determining , from the list of the row identifiers mapped with the unique numbers, duplicate list entries based on the plurality of attributes requested in the query; deleting the duplicate list entries from the list of the row identifiers mapped with the unique numbers to isolate for each unique number a single remaining tuple; and inserting the single remaining tuple into the result set. receiving a query from a client application to retrieve data from a database comprising a plurality of database tables, the query having a plurality of requested attributes and one or more conditions; characterized by listing the same row identifiers in each of the plurality of database tables for a result set that matches the one or more conditions; for each of the row identifiers, calculating a tuple of value identifiers having an entry for each of the plurality of requested attributes; before projection, calculating for each database table of the plurality of database tables comprising one or more of the plurality of requested attributes and for each of the row identifiers in each said database table a unique number, wherein the row identifiers are assigned a unique number for each distinct combination of value identifiers using a hashing algorithm so that row identifiers having exactly the same combination of value identifiers for the requested plurality of attributes receive the same unique number, wherein the calculating is performed for each database table of the plurality of database tables separately and in parallel; generating a list of the row identifiers mapped with the unique numbers; during the projection, determining , from the list of the row identifiers mapped with the unique numbers, duplicate list entries based on the plurality of attributes requested in the query; deleting the duplicate list entries from the list of the row identifiers mapped with the unique numbers to isolate for each unique number a single remaining tuple; and inserting the single remaining tuple into the result set. <EOS>