Subject | Re: [ib-support] Re: error when add computed |
---|---|
Author | Lucas Franzen |
Post date | 2003-04-04T19:00:12Z |
ronaldorezende schrieb:
"Computed columns are based on a expression. Column values are are
computed each time the table is accessed."
And: I didn't talk about "select *", it's all about select count (*) (or
select count (PK_FIELD) if you prefer this one), if I remember the last
postings.
So I still keep insisting: What do you need it for?
You are working in a multi-user environment, so keep inserts and
especially updates fast to avoid deadlocks.
If you want some statistics (and counting sth. IS statistics for me) use
the appropriate SQL - that's what SQL has the syntax "count, sum, avg,
group by, having ..." for.
Luc.
>Fine, but let me quote the docs one more time:
> > SELECT COUNT(*) might be okay with Desktop-databases, maybe even
> with
> > Oracle or MSSQL, but it should be used rarely (if at all) with
> IB/FB due
> > to the multiple generation architecture -
> > count (*) is not written somewhere in a header of a table - it has
> to be
> > evaluated every time you call it and this means that the table has
> to be
> > scanned totally (which makes it quite slow).
>
> I don't know why not use the count in my table. I dont use
> the "select *". I only use the computed by column when it's really
> necessary.
"Computed columns are based on a expression. Column values are are
computed each time the table is accessed."
And: I didn't talk about "select *", it's all about select count (*) (or
select count (PK_FIELD) if you prefer this one), if I remember the last
postings.
So I still keep insisting: What do you need it for?
You are working in a multi-user environment, so keep inserts and
especially updates fast to avoid deadlocks.
If you want some statistics (and counting sth. IS statistics for me) use
the appropriate SQL - that's what SQL has the syntax "count, sum, avg,
group by, having ..." for.
Luc.