in reply to Re: Contemplating some set comparison tasks
in thread Contemplating some set comparison tasks

It's in a postgreSQL DB actually. I'm less familiar with SQL, so the SELECT DISTINCT's don't scare me, but I get a little spooked at GROUP BY's and I fear doing some kind of JOIN on this table and itself.

If I can come to grips with the concept I want to accomplish - and Perl is the mechanism I'm hoping I can do this with the easiest - I ought to be able to work out the SQL solution, and then you're right, the DB engine probably would be best.

  • Comment on Re^2: Contemplating some set comparison tasks

Replies are listed 'Best First'.
Re^3: Contemplating some set comparison tasks
by Anonymous Monk on Aug 08, 2014 at 19:40 UTC

    You said you're looking for something efficient - for such a relatively large data set, having the DB do the work should almost always be more efficient than reading the data into Perl and doing the work there.

    If you're worried about getting the queries right, how about setting up some test cases? A few minimal sets of data for which you can figure out the desired output "by hand" for the various queries you want to run, and then work on the queries until they match the desired output.

      Yeah, I think I can set up a table with a set, and make sure it has data that will yeild results that I could understand, based on the SQL. Dang, I should've thought to do that. Thanks!