Issue Feature Closed

#21025Performance improvement for queries that expect just a single result row

Jo Hasenau 09/10/09, 13:11 updated 03/29/11, 14:22

Description

I would like to introduce a new function exec_SELECTgetSingleRow() to prevent exec_SELECTgetRows() being used for queries that definitely expect only one row to be returned.

Just like exec_SELECTgetRows() it will contain all necessary function calls to execute the query, get the result row, free the result and return the data.

To avoid any additional function calls IMHO it should not be a variant of exec_SELECTgetRows() but another function.

Additionally it should be used in all places within the core, that are using exec_SELECTgetRows() but expecting single result rows only, to speed up the overall performance of the system. (An indicator could be LIMIT the rest can be recognized by checking the context)

Remaining question: If I create a patch should this contain all these changes at once or should this be done in different patches with their own bugtracker entry?

(issue imported from #M11916)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.