rails/rails — pull request #3687 by kennyj (2011-11-19 01:00:19+00:00)
Title: Use `show index from`. We could fix `pk_and_sequence_for` method's performance problem (GH #3678)

#3678 problem is solved by https://github.com/christos/rails/commit/280b2b725b488ef71556970ee895ccaddc315e0c

But we have a little another problem (a schema dump runs rather slowly)

Please see https://github.com/rails/rails/issues/3678