MCPcopy Create free account
hub / github.com/corestoreio/pkg / OrderByRandom

Method OrderByRandom

sql/dml/select.go:298–303  ·  view source on GitHub ↗

OrderByRandom sorts the table randomly by not using ORDER BY RAND() rather using a JOIN with the single primary key column. This function overwrites previously set ORDER BY statements and the field LimitCount. The generated SQL by this function is about 3-4 times faster than ORDER BY RAND(). The gen

(idColumnName string, limit uint64)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Calls

no outgoing calls