I do this fairly often, but after talking to some other people I realized it might be a good idea to share a couple of quick SQL scripts. The idea is: you have some large operations you are doing on your database. Of the kind where you load or update lots of data – which means that it will run a lot faster with the constraints in the database turned off. All of them, or maybe just the FOREIGN KEYs, depending on exactly what you are doing. The following simple queries will generate SQL scripts that drop all your constraints, and then re-create them. Adding filters for just a single table/namespace/constrainttype is trivial, but left as an exercise for the reader…

Mas:

http://blog.hagander.net/archives/131-Automatically-dropping-and-creating-constraints.html

Post comment

*

Buscar en DbRunas

Descargar versiones libres recomendadas actualizadas

Revistas

PostgreSQL Magazine (ingles): PostgreSQL Magazine
SQL Server (ingles): SolidQ SQL Server Journal
SQL Server (ingles): Code Magazine
PostgreSQL (ingles): Postgres OnLine Journal
Oracle (ingles): oraclemagazine-digital
SQL Server (español): MSDN Magazine
MySQL (ingles): MySQL Magazine

Manuales

Recursos

Archivo diario de noticias

December 2008
M T W T F S S
    Jan »
1234567
891011121314
15161718192021
22232425262728
293031  

Archivo por mes y año

Comentarios recientes

RSS Ayudas Oracle

RSS Ayudas PostgreSQL

RSS Ayudas MySQL

RSS Ayudas SQL Server

RSS Ayudas DB2

RSS Ayudas SQL

RSS Feeds Planeta PostgreSQL-es

RSS Feeds Planet PostgreSQL

RSS Feeds Planeta PostgreSLQ Brazil

RSS Feeds Planet MySQL

Blogroll

Clouds

Desde donde nos visitan

Site5 | Experts In Reseller Hosting.