Postgres: Find table foreign keys (Faster alternative)
- by Najera
Is there faster alternative to this:
Take almost 1 minute in our server.
SELECT
tc.constraint_name, tc.table_name, kcu.column_name,
ccu.table_name AS foreign_table_name,
ccu.column_name AS foreign_column_name
FROM
information_schema.table_constraints AS tc
JOIN information_schema.key_column_usage AS kcu ON…