Richard, Tom: > > > Call me crazy, but maybe we have to throw a message for primary > > > key lookups on foreign key tables without indexes. I hate to throw a > > > message on update/delete rather than create table, but I don't see > > > another way.
You're crazy. For one thing, there are sometimes reasons to *not* have such an index, and I really don't want a message I can't turn off thinking it knows how to design a database better than me. Second, many applications will take warnings on update as an error condition and abort; this would be fatal to them. > > I don't think that will fly. It's too noisy/repetitive, and it's > > complaining at the wrong time (in production rather than when you're > > setting up the DB schema). Imagine how annoying it would be to get > > such warnings if you were a user without the privileges needed to create > > the requested index. Not to water down anyone's beer, but I'm personally wondering how much good any of these warnings will do, on CREATE TABLE or ADD CONSTRAINT or otherwise. I already get 2-4 warnings whenever creating a new table due to keys, etc. I don't read them anymore unless one of them is an ERROR, and I suspect that a lot of DBAs are the same. -- Josh Berkus Aglio Database Solutions San Francisco ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend