Different from the conventional packet-based random access schemes where each data packet needs to contend for channel access, with connection-based random access, a connection is first established before data packet transmission. Despite the consensus that there exists a critical threshold of the data packet transmission time, only above which establishing a connection is beneficial, characterization of such a threshold has received little attention. In this paper, a comparative study will be presented on the optimal throughput performance of the packet-based random access and the connection-based random access to characterize criteria for beneficial connection establishment. Based on a unified channel-centric model, explicit expressions of the maximum effective throughput are obtained for both packet-based and connection-based Aloha and Carrier Sense Multiple Access (CSMA). The analysis shows that whether connection establishment is beneficial crucially depends on the sensing capability of nodes. The threshold of data packet transmission time with Aloha is found to be much lower than that with CSMA, indicating that the throughput gain brought by connection establishment is more significant when sensing is absent. The analysis sheds important light on the access design of machine-to-machine (M2M) communications.