Reply to Temp Table Faster?

Your name:

Reply:


Posted by wackyphill on 09/28/68 11:35

If you were doing paging of results on a web page and were interested
in grabbing say records 10-20 of a result set. But also wanted to know
the total # of records in the result set (so you could know the total #
of pages in the set).

Would it be better to query the DB table 2X. Once for Count(*). And
again for the records for the current page?

Or better to create a temp table, select the records into it, and then
get count(*) and the page results from the temp table?

I saw an example in a book that made a temp table to do this and to me
it seemed like it would be slower. I don't get the reason for a temp
table. Anyone have any ideas?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация