Subject Re: [ib-support] large deletions
Author Helen Borrie
At 01:05 PM 03-07-02 +0200, you wrote:
>Hi Jason,
>
>I agree, but, if you make that ,let's say, "ACTIVE" field
> create table ... (
> ...
> ACTIVE char(1) check value in ('Y', 'N'),
> ...

Not ACTIVE - it's a reserved word.


>and, then, an index:
> create index ... on THAT_TABLE (ACTIVE);
>
>and after that you make a view like this:
>
> create view ... as select * from THAT_TABLE where ACTIVE = 'Y';
>
>selecting from that view shoud be fast enough because the count of the
>"active rows" it will be small.

Why add the overhead of a view, when the direct SQL has exactly the same
output?

>On the other hand, I don't know which is the maximum rows per table limit of
>Interbase. This could be a problem ! In this case I see that Hellen

I'm the one-L Helen but it wasn't I who said that. As for maximum rows per
table, it's 2^32; but it's never a good thing to retain garbage in the
db; and frequent small delete batches are a lot more hygienic that
apocalyptic purges.

heLen

All for Open and Open for All
Firebird Open SQL Database · http://firebirdsql.org ·
http://users.tpg.com.au/helebor/
_______________________________________________________