Short of measuring and optimizing, compiler optimization level is just about the only thing that will impact the performance of your application. Typically, you'll want an optimization level of -Os
; that is, optimized code, but optimized for size, too. Since the iPhone's memory is limited, reducing code size is useful.
Beyond that, you are going to have to measure the performance of your application and react accordingly. There are many tools in Instruments and otherwise to help you in this task. The tools are actually pretty darned good, once you figure them out.
Given that you haven't actually measured anything yet (which is good -- make it work, make it right, make it fast), there may be low hanging fruit. Do you redraw something too often? Have some automatic timed event firing too fast? etc... Just don't fall into the trap of premature optimization; the need to measure & react is paramount to successful optimization.
Note also that you can do coarse grained optimization via the Simulator, but you really need to do the analysis on the app running on the device to do final polish optimization.
(1) Sounds like your database query is really slow. Not knowing the schema, etc, it is hard to know if that is truly the case.
(2) When doing performance analysis and the time is consumed by a function in an unknown library, look up the stack and see what is calling that library to figure out why your app is triggering the performance slowdown.