On Jan 14, 10:47 am, Joe Lovick <[email protected]> wrote:
> Hi,
>
> I have a optiminsation problem, I have a beutiful but large db (22Gb, yes
> you read that right) in Mysql, and i made a mistake in populating part of
> it, so i thought that i would write a quick script with sequel to weed out
> the data that shouldnt be there, unfortunately it runs too slowly to be of
> use...
I'd use the aggregate functions of the database to do the work for
you:
DB[:New_Stats].
where(:Experiment_ID => 2).
group_and_count(:src_file_id, :Stat_ID, :Channel, :Table_id).
having{count > 1}
Assuming I understand your situation, you should just have to process
the results of that dataset.
Jeremy
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en.