http://qs321.pair.com?node_id=783460


in reply to Re^3: Help with removing dupes from a string with perl
in thread Help with removing dupes from a string with perl

For the record, I hate that "feature". What it means is that if you accidentally leave a field that is in the SELECT out of the GROUP BY, you'll introduce a join. Depending on the query, this join can be very large and very poorly behaved. Particularly if you've left joined to a large table.

When I worked with Sybase I think I made this mistake every few months (with the left out field from a very large table), and inevitably didn't notice until my query had been grinding away for half an hour and the database was feeling the pressure. The database it usually happened on was used for production purposes, but luckily the consequences were only internally visible, and very few people were affected. Still it was my second greatest annoyance with Sybase. (They've since fixed my greatest annoyance at the time, which was page level locking.)

  • Comment on Re^4: Help with removing dupes from a string with perl

Replies are listed 'Best First'.
Re^5: Help with removing dupes from a string with perl
by mpeppler (Vicar) on Jul 30, 2009 at 06:02 UTC
    I agree with you for the general case (and I use a development tool that will flag such omissions as a defect).

    But occasionally it is really useful - in particular for me as I write way more SQL (in stored procs, etc) than perl or any other client-side language these days.

    Michael