SPAI needs to know each image size to work properly. To do this, it first checks the filename (thumbnails usually have the dimensions appended to it) and then, the physical image itself on disk. If SPAI cannot determine the size either way, it resorts to looking for the information on the postmeta
database table.
If the option is enabled, SPAI will do that database check when it needs to. If the option is disabled, this last check inside the database will not be done anymore and because of this, in some cases, when the image information isn’t found in the other 2 places, SPAI will assume that it simply does not know the image size.
This option is recommended to be disabled if you notice a high MySQL load that goes away if you deactivate SPAI. In case of doubt, you shouldn’t change it.