Melting points of NaF and MgO

The ions of NaF and MgO are isoelectronic, and the intermolecular distances are about the same (235 pm and 212 pm, respectively). Why then are the melting points of NaF and MgO so different (992 degrees C and 2643 degrees C, respectively)?