On Thu, Aug 20, 2009 at 1:46 PM, Abiel<abi...@gmail.com> wrote: > > Is there an efficient way to use Django models to load a large number > of records into a database without falling back on raw SQL? Creating a > large number of model objects and then saving each one individually is > very slow (I imagine Django is running INSERT and COMMIT each time?). > > Thanks very much. > > > >
Django doesn't currently support any form of bulk insert. Using raw SQL is your best option at this point. Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." -- Voltaire "The people's good is the highest law." -- Cicero "Code can always be simpler than you think, but never as simple as you want" -- Me --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---