<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On 21 Sep 2007, at 09:14, K J wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; ">The problem here is, Memcache arrays don't have indexes where searches for a particular ID or range is fast, as opposed to a DB server.  Or is there a way around this too?</span></blockquote></div><div><br class="webkit-block-placeholder"></div>Well, memcache doesn't have arrays, nor does it search in the DB sense - pretty much anything you ask for that is in the cache will take about the same amount of time to find. You might grab a list of 1000 IDs, then do a multiget for the first 100 individual items (i.e. the first page), then you might have to hit the DB for any missing entries (which you would then cache for next time).<div><br class="webkit-block-placeholder"></div><div>MySQL is not particularly fast - I know that the Valentina database system is around 500% faster for an exact match on a single primary key, and that's supposed to be about the fastest thing you can do in MySQL. Mind you, Valentina is a rather different beast...</div><div><br class="webkit-block-placeholder"></div><div>Marcus<br><div> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div><div style="">-- </div><div style="">Marcus Bointon</div><div style="">Synchromedia Limited: Creators of <a href="http://www.smartmessages.net">http://www.smartmessages.net</a>/</div><div style="">UK resellers of info@hand CRM solutions</div><div style="">marcus@synchromedia.co.uk | <a href="http://www.synchromedia.co.uk">http://www.synchromedia.co.uk</a>/</div></div><br class="Apple-interchange-newline"></span></span></span> </div><br></div></body></html>