lundi 7 novembre 2016

How we can design best optimized solution: Generate huge random numbers and check in database table whether this numbers are their or not

We have one table like :

Table Name :

random_number_series

Its Columns are as below :

number      [numeric(10)]
name        [varchar(10)]
status      [tinyint(1)]
type        [tinyint(1)]
createdDate [datetime]

This table have around 25-30 crore rows.

Now our requirement is that we will generate random numbers in big quantity i.e. 10 lacs. We want to check that this generated numbers are thier in above table (with number column) or not.

How best we can do this?

Note:

-> Random numbers will be generated in application logic.

-> I want to know strategy / pseudocode how best we can design?

-> DB: MySQL




Aucun commentaire:

Enregistrer un commentaire