2 added 5 characters in body
source | link

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

We have one table like  :

Table Name  :

random_number_series

random_number_series

Its Columnscolumns are as below  :

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

This table have around 25250-30 crore300 million rows.

Now our requirement is that we will generate random numbers in big quantity i.e. 10 lacs1 million. We want to check that this generated numbers are thierthere 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?

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?

How we can design best optimized solution: Generate huge random numbers and check in database table whether this numbers are there 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 250-300 million rows.

Now our requirement is that we will generate random numbers in big quantity i.e. 1 million. We want to check that this generated numbers are there 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?

1
source | link

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?