Currently, medical data clustering is a very active and effective part of the research area to take proper decisions at the medical field from medical data sets. But medical data clustering is a very challenging issue due to limitless receiving data, vast size, and high frequencies. To achieve this and improve the performance with fast and effective clustering, this paper proposes a hybrid optimization technique, namely, the K-means-based rider sunflower optimization (RSFO) algorithm for medical data. In this research, initially, the data preprocessing phase has been carried out to clean the current input medical data, and then in the second phase, important features are chosen with the help of the Tversky index with holoentropy. Finally, medical data clustering has been carried out by using hybrid K-means-based rider sunflower optimization (RSFO) algorithm. RSFO is designed to produce optimum clustering centroid, which is the combination of two optimization techniques, such as rider optimization algorithm (ROA) and sunflower optimization (SFO). This hybrid algorithm can get the advantages of both K-means and RSFO technique and avoid premature convergence of K-means algorithm and high computation cost of optimization technique. K-Means clustering algorithm is used to cluster the medical data by using an optimum centroid. The efficiency of the proposed K-means-based rider sunflower optimization algorithm is examined with a heart disease data set and analyzed based on three different performance metrics.