On Monday 12 September 2005 23:56, Peter Fitzgibbons wrote:
> I have a production existent MS SQL Server 2000 db that is 1.5 gb
> total size.
>
> rake clone_structure_to_db takes about 12 mins on my local machine.
> The sql generate process takes about 30 sec, and the run of the
> resulting script from cmdline takes about 15 sec...
>
> So what is taking up the other 11 mins of this process ?
I''m not using SQL Server thus have no specific idea, but you could try
to run the prerequisite tasks of clone_structure_to_db
(db_structure_dump, purge_test_database) individually to find out where
the time is used.
If that doesn''t help, kill the original clone_structure and rewrite it
yourself. If you''re using Rails 0.13.1, you can just overwrite the task
in the Rakefile. If you''re using Edge Rails with a modularized
Rakefile, you have to neuter the existing task before redefining it:
Rake::Task::TASKS[''clone_structure_to_test''] = nil
desc "Recreate the test databases from the development structure"
task :clone_structure_to_test => :create_test_database
desc "Create a test database from scratch"
task create_test_database do
...
end
HTH,
Michael
--
Michael Schuerig Thinking is trying to make up
mailto:michael-q5aiKMLteq4b1SvskN2V4Q@public.gmane.org for a gap
in one''s education.
http://www.schuerig.de/michael/ --Gilbert Ryle