on 02-20-2008 7:44 AM
Hello Everybody
I want do do an:
"Update table xyz SAMPLE 10 PERCENT "
for my big tables.
Do i have to fire this command for each wanted table or does an:
"update table set sample_rows = .NULL.,sample_percent = 10 where ..."
lead to the same result.
Best regards
Albert
Sorry
Of course it has to be:
Alter table xyz sample 10 PERCENT
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Albert,
basically the sample size has to be changed seperately for each table.
But if you want to e.g. set the sample size for all tables with more than 1000000 entries you can generate a script like this:
select 'ALTER TABLE ' || t.tablename || ' SAMPLE 10 PERCENT //'
from files f, tables t
where
f.type ='TABLE'
and f.entrycount >=1000000
and f.fileid = t.tableid
The result of this will be a script that you can run directly.
KR Lars
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.