3 ms·
To answer your question about getting the first 10 rows, you can use the LIMIT clause, which will influence the planner's decisions. Or you can declare a cursor
by wulczer 16y ago
To answer your question about getting the first 10 rows, you can use the LIMIT clause, which will influence the planner's decisions. Or you can declare a cursor for your query and only fetch the first 10 rows.
As for GCC, it's usually up to the packagers, but the source tree after running ./configure gets compiled with:
-O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wformat-security -fno-strict-aliasing -fwrapv
- gaius 16y agoThat's kinda my point. Aren't those "hints" to the compiler?
- wulczer 16y agoNot in the sense that query hints are "hints" to the planner. -O2 means "take more time compiling but produce faster code". This hint will always be valid and useful, regardless of how the codebase changes. Query planner hints can become obsolete as the data distribution changes. -fwrapv and -fno-strict-aliasing are correctness settings -Wxxx are just help for the developers