mdc table created fixed two costly sql statements