Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
Just keep in mind that this kind of query has the potential to dim all of the lights in the computer room. . .
If this is some one-time requirement or something that only runs sedom in batch, the impact may not be much, but if the table is high-volume and this query is often needed in online processing - there be monsters. . .
Suggest this process be run against full-volume data to make sure it runs acceptably with minimum impact to the rest of the system.
If the table has only 100 rows, it may not be important if the table contains 100 million rows, this will be an entirely different matter.