On Fri, May 20, 2022 at 10:06 AM fake farm <dmwood...@gmail.com> wrote:
> Hello, > > I am running `#insert` and it runs well for certain rows, but not others. > My DB connection is: > > ``` > @db_primary ||= Sequel.connect(adapter: :snowflake, drvconnect: > PRIMARY_DB) > table = @db_primary.from(:people).order(:first_name) > table.insert(person) > ``` > > I would like to run explain on an `#insert`, but I'm not entirelly sure > how to get to `#explain`. My research came up with `Dataset#explain`, but I > am unable to figure out how to access it. I have tried various forms of: > > ``` > table.explain(insert) > table.insert().explain > @db_primary.explain > ``` > > I am requesting help writing `#explain` syntax, and/or being pointed in > the direction that can help me do so. > For this, you can use: table.with_sql(:insert_sql, person).explain 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/CADGZSSfc%2BiNYKHYVWQ7yHZz6WzHb2326nR4QxFYK6DZFuAcjpQ%40mail.gmail.com.