1

Topic: Sampling of several lines from the big table

Day kind.
There is a certain big table with which lines, to 100 are selected, processed and marked as processed.
Purely  as it is possible simple means on Express  an index.
To create an index on a column will be processed"most likely feeblly, the index on 99 % will be with one value. Whether helps with such cases filtered an index?

2

Re: Sampling of several lines from the big table

mezzanine,  monotonically vozr/decreasing unique attribute is?

3

Re: Sampling of several lines from the big table

buser;
Is PK with identity. I.e. it is possible to make composite PK + "is processed". About that speech?

4

Re: Sampling of several lines from the big table

mezzanine wrote:

to Create an index on a column will be processed"most likely feeblly, the index on 99 % will be with one value.

to argue for indexes it is necessary to see your request

5

Re: Sampling of several lines from the big table

Whether

mezzanine wrote:

Helps with such cases filtered an index?

Yes

6

Re: Sampling of several lines from the big table

mezzanine wrote:

to Create an index on a column will be processed"most likely feeblly, the index on 99 % will be with one value.

If will select on "is not present", it will be the super-selective index

7

Re: Sampling of several lines from the big table

Unambiguously apply the filtered index.
Only it is necessary to remember that during the moment insert/update/delete/merge tables should be following setting:

set ansi_padding, ansi_warnings, arithabort, concat_null_yields_null on;
set numeric_roundabort off;