Development Articles
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherDevelopment Articles

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 20th, 2003, 04:50 AM
marcusjhd marcusjhd is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Location: Worcester, UK
Posts: 2 marcusjhd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Optimised pagination

Hi

I've always been torn between using a COUNT(*) followed by a LIMIT and just doing a single query then using mysql_data_seek(). The two-query solution limits the size of the query result, but becomes very slow when using queries with many joins and/or non-indexed (eg wildcard) searches because you are having to repeat it.

I would be very interested to know if anyone can suggest a more efficient and flexible solution. The ideal would be a way to make MySQL somehow cache the result of the joins etc so that the second query were much faster than the first. But I have no idea how you would do this.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherDevelopment Articles > Optimised pagination


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway