The effect of gap width and partition thickness on the flow mechanism and heat transfer of partitioned thermal convection is investigated using a thermal lattice Boltzmann method from Ra = 8 × 106 to Ra = 1 × 108. Partitioning effects on the heat transfer and the physical mechanism of flow are analyzed using the velocity field and temperature field of the convection. Numerical simulation results show that the optimal gap width decreases and that the optimal partition thickness increases with increasing Rayleigh number (Ra). Gap width and partition thickness have a joint effect on the heat transfer. We have counted the comprehensive influence of dimensionless gap width (D*) and dimensionless partition thickness (S*) on diaphragm heat on Nu under Ra = 108. The results show that the global maximum of Nu appears in the regions of 0.004<D*<0.006 and 0.02<S*<0.035. Two important factors affecting the partitioned thermal convection have been found. In addition, an interesting relationship between the average Nusselt number and the presence of leakage vortices is also discussed in this study.