On Tue, Aug 2, 2022 at 5:25 AM Pierre Yager <pierre.ya...@crisalid.com> wrote:
> Hello, > > Still working on this GeoNames database. > > After reading this guide in the PostgreSQL documentation ( > https://www.postgresql.org/docs/current/populate.html) i see some room of > improvement in my GeoNames dataset injestion process. > > I should drop indexes and foreign key prior to data injection (using COPY > through DB.copy_into(), thank you Sequel) > > May Sequel help a bit to achieve this process quickly by using > Db.tables(), DB.indexes() and DB.foreign_key_list() ? > > Could the result of these methods be used to drop and then recreate > indexes and foreign_keys ? > It's possible to do so, but please be aware that Database#indexes does not return all indexes on a table, In general, partial indexes are excluded, as are indexes on expressions that are not simple columns. You should definitely test by running a PostgreSQL schema dump on a separate system before and after the drop and recreation to ensure there are no changes. Thanks, Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to sequel-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sequel-talk/CADGZSSdE_%3DKiFP824JpRMm85Ag_pna9mZyrC%2BqFT2Xz5%3DheqmA%40mail.gmail.com.