Sayfalar

31 Aralık 2015 Perşembe

Sybase IQ' da tüm indexleri rebuild etme




Sybase IQ veritabanında tablo yada şema (shema) bazlı indexleri rebuild edebilriz.

Bunun bir yöntemi de idexleri drop create etmektir aslında ama rebuild ederek te indexleri güncelleyebiliriz. text indexler için geçerli değildir.


 İndex türlerine göre ve shema türlerine göre seceneği mevcuttur.



select 'sp_iqrebuildindex ''' +su.name+'.' + T.[table_name] + ''', ''index ' + I1.index_name + '''' + char(13) + 'go'

from sysidx I1, sysiqidx I2, systab T,  sysobjects so,sysusers   su,SYSTABLE st

where T.table_id = I1.table_id
and (I2.table_id=I1.table_id and I2.index_id = I1.index_id)
and  su.name='BTRANS'
and st.object_id=so.id and so.type = 'U'  and  so.uid  = su.uid
and st.creator=T.creator and I2.index_type='HG'



Sybase taşıma işleminden sonra performans açısından aşağıdaki komutlar işinize yarayabilir

sp_iqcheckdb 'verify database'

go
sp_iqcheckdb 'allocation database'

go

Hiç yorum yok:

Yorum Gönder