Hi Ratnam,
SAMPLE (RANDOMIZED ALLOCATION) returns a truely random result while TOP n (without PERCENT/ORDER BY) simply returns the first n rows found on a single AMP (or multiple AMPs). SAMPLE is always more overhead/slower compared to TOP (without PERCENT/ORDER BY)
If you just want to see some data better use TOP, if you do some statistical stuff switch to SAMPLE.
Btw, what is MECONOSAM LEVEL?
Hi Ratnam,
SAMPLE (RANDOMIZED ALLOCATION) returns a truely random result while TOP n (without PERCENT/ORDER BY) simply returns the first n rows found on a single AMP (or multiple AMPs). SAMPLE is always more overhead/slower compared to TOP (without PERCENT/ORDER BY)
If you just want to see some data better use TOP, if you do some statistical stuff switch to SAMPLE.
Btw, what is MECONOSAM LEVEL?