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
Manuales
Recursos
Archivo diario de noticias
Archivo por mes y año
Comentarios recientes
- Miguel Ponte on Oracle – PL/SQL – Paginación de registros de una consulta
- Miguel Ponte on Oracle – PL/SQL – Paginación de registros de una consulta
- Pibe on Extraer datos de MySQL a Excel vía ODBC (como en la vieja escuela)
- fds on Manual de Instalacion Netbeans 6.71. POSTGRESQL -8.4.1 Y APACHE2 PHP5
- berto on Tutorial Hibernate y JavaServer Faces (JSF)
- Elvis on Accediendo a MySQL con node.js
- instalacion de red on Script para comprobar si las bases de datos están configuradas espejadas en SQL 2005/2008
Ayudas Oracle
- Revisar condiciones en otras tablas
- Tomar datos de 3 tablas y formar un cursor
- Recuento de iteración Cero
- Dudas Php - Oracle
- conexión en sql *plus
Ayudas PostgreSQL
- SQL mirando cantidades
- Extraer base de dato
- ¿Cómo instalar postgresql?
- Como instalo Postgresql manualmente en Ubuntu 9.10
- Problema com la hora
Ayudas MySQL
- Consulta de varios campos en distintas tablas
- Utilizar dos bases de datos en directorios distintos con mysql...
- Problema con imágenes en base de datos
- instalar mysql y phpmyadmin en wind 7
- problemas con mysql
Ayudas SQL Server
- Igualar formatos de fecha entre dos servidores sql vinculados
- Convertir texto en numero en T-SQL
- SQL Server 2008 R2 en red
- consulta sql select con fecha
- Quiero cambiar una cuenta de inicio de "servicio" de SQL SERVER 2000 (MSSQLServer)
Ayudas DB2
Ayudas SQL
- No mostrar columnas vacías en un select
- Ayuda consulta sql Oracle
- problema con una select anidada
- Inner encadenado con suma
- Tengo problemas con SQL y Between, no me respeta el rango entre Fecha1 y Fecha2.
Feeds Planeta PostgreSQL-es
- Disponible PostgreSQL Magazine #01
- Transacciones autónomas en PostgreSQL
- Calentando motores con pgFincore
- Líneas de tiempo del proyecto PostgreSQL y las principales RDBMS
- Nuevas versiones de PostgreSQL disponibles
Feeds Planet PostgreSQL
- Redirecting planetpostgresql.org to planet.postgresql.org -- please update your bookmarks
- 2010 retrospective
- Waiting for 9.1 – Unlogged tables
- Version Control Visualization and End Point in Open Source
- PostgreSQL Weekly News January 2nd 2011
Feeds Planeta PostgreSLQ Brazil
- Faça Você Mesmo: Mapas Mentais Gerados Via SQL!
- Acesse: Revista Internacional de PostgreSQL
- Webcast: Por que PostgreSQL?
- PGDay IFRO Porto Velho - Rondônia 2012
- Entendendo valores nulos no PostgreSQL
Feeds Planet MySQL
- Bug.mysql.com and Contributions!
- MySQL Handshake and Encryption
- Meet the MySQL Experts Podcast: MySQL Replication Global Transaction Identifiers & HA Utilities
- Can MySQL use primary key values from a secondary index?
- Joins: inner, outer, left, right