Groups | Blog | Home
all groups > sql server data warehouse > october 2004 >

sql server data warehouse : Delete in a dimension table is very long...


Jéjé
10/4/2004 2:06:45 PM
Hi,

I want to delete "Inactive" rows in a dimension in my DW, but its slow due
to relationships.

First. I want to keep these relationships to insure a excellent data
integrity
Second. I delete rows linked to these deleted items before I delete my
dimension.
(So, normally, my "inactive" flagged rows will don't have any data in my
fact tables)

Removing 100 rows in my dimension takes 3minutes !

SQL Server appear to lock all the ralated tables and put a lot of
information in the log of the database.
So how can I improve this?
what are the best transaction options?
Maybe some table hints can be used?

Currently, I'm looking for deleting the relationship just during this delete
step, then recreating these relations after the delete.

thanks for your help.

Jerome.

ilona
10/5/2004 5:02:53 PM
Create a view in your relational data warehouse which will filter out
inactive rows. Then create a dimension off the view instead of the table.
You can have a view as source of rows for your dimensions and cubes.

If you maintain indexes on your source tables, then every time you do the
inserts, your indexes have to be updated as well, resulting in poor
performance. Also if you have logging enabled for the database that serves
as a dsata source for the cube, then every time you do deletes and inserts,
the transaction log has to be updated as well.

If your data warehouse is updated infrequently, you can set database loggin
to "Simple" which would mean the only restore option available will be from
a complete database backup -- this would minimize logging and make your
inserts/deletes faster.

Regards,
Ilona Shulman
Senior Development Consultant, DBA
SSE Inc
http://www.sseinc.com


[quoted text, click to view]

Jéjé
10/11/2004 10:55:37 AM
I've already setup the log option to "simple"
But the hard delete takes too many time

maybe I have missed some transaction option?
or table hint option?

"ilona" <ieshulman@sseinc.com> a écrit dans le message de news:
uf7UScyqEHA.1964@TK2MSFTNGP12.phx.gbl...
[quoted text, click to view]

AddThis Social Bookmark Button