Search Postgresql Archives

What's faster?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello all!

I'm performing a query that returns me hundreds of records... but I
need cut them in pages that have 15 items! (using PHP)

So, is it faster:

  select blablabal from _complex_query
  if (count($result) > 15) show_pages;
  show_only_15_rows($result);

or:

  select count(*) from _complex_query
  if ($result1 > 15) show_pages;
  select blablabal from _complex_query LIMIT ... (see the LIMIT!)
  show $result

On the first, I can use pg_num_rows instead of count(), too.

what do you think?

Thank you!



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux