Article View: news.software.nntp
Article #84244Re: Is getting article by Message ID inherently slower than by Article Number?
From: D. Stussy
Date: Tue, 09 Aug 2011 06:40
Date: Tue, 09 Aug 2011 06:40
54 lines
4065 bytes
4065 bytes
"drek" <none@none.invalid> wrote in message news:6s5147tefb7t0r5pmmnvqoa3j74qh15ukk@4ax.com... > On Sun, 07 Aug 2011 14:39:59 +0100, MM <kylix_is@yahoo.co.uk> wrote: > <4m4t37tcfcs9d57e60ctb8gubh0fb42sa7@4ax.com>: > > >>On Sun, 07 Aug 2011 12:55:48 +0100, MM <kylix_is@yahoo.co.uk> wrote: > >> > >>>I'm experimenting with Message IDs and this approach seems a lot > >>>slower than when specifying articles by article number. > >>> > <snip> > > > >Every article in Usenet has a number and a message id. The message id > >is unique across Usenet, but the article number is specific to each > >news server. I think the way it works at the server end, when one > >requests an article by message id, is that the server goes away and > >looks up the article number it has allocated to that message id. This > >may take a while, depending on what kind of database is implemented, > >speed of servers etc. > > > If that's the case wouldn't the reason for any difference you're > seeing be best answered by the NSP you're using? > > Without specifying the software and methodology used in the comparison > I don't see how anyone in this group could give a meaningful answer. Agreed, but there can be a meaningful answer with some assumptions. By article number: Most news servers maintain an index of some sort of all articles in a group, with high and low watermarks. Therefore, the articles in a group can form an array (if variable data, an array of fixed pointers could be used). Therefore, the article number less the low watermark can be used as a direct index into a fixed array, thus retrieving the article pointer in a search of time "order(1)." This assumes that expired articles between the watermarks occupy array element locations until they become out of range. Otherwise, the search will be order(log2(n)) - i.e equivalent to a strict binary tree search since the array is usually kept in sorted order. By message ID: Most news servers maintain a list of message IDs of all [recent] articles on the server which is group independent. As this is generally an UNSORTED list, searching takes order(n * log(n)) time on average to find the entry with the article storage pointer. [Do I have that correct, or is it order(n^2)?] With either method, once the article storage pointer is retrieved, the cost (time) to actually retrieve the article is the same and thus a constant in comparison that drops out. It's been 21 years since I've had to consider the magnitude of search operations, so I hope I got it correctly stated. In both cases, "n" represents the total number of entries present in the appropriate index.
Technical Details
Message-ID:
<j1qkob$jjd$1@snarked.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.dca3.giganews.com!border2.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!news.snarked.org!pool-71-106-211-51.lsanca.dsl-w.verizon.net!not-for-mailReferences:
<97vs37plvqd467e3k8ipincoo6qm5a29kc@4ax.com> <he0t37l6cali01lr8rternu2js5hcobnhq@4ax.com> <4m4t37tcfcs9d57e60ctb8gubh0fb42sa7@4ax.com> <6s5147tefb7t0r5pmmnvqoa3j74qh15ukk@4ax.com>Show Full Headers
Complete Article Headers
Message-ID: <j1qkob$jjd$1@snarked.org> Subject: Re: Is getting article by Message ID inherently slower than by Article Number? Date: Mon, 8 Aug 2011 23:40:17 -0700 From: "D. Stussy" <spam+newsgroups@bde-arc.ampr.org> References: <97vs37plvqd467e3k8ipincoo6qm5a29kc@4ax.com> <he0t37l6cali01lr8rternu2js5hcobnhq@4ax.com> <4m4t37tcfcs9d57e60ctb8gubh0fb42sa7@4ax.com> <6s5147tefb7t0r5pmmnvqoa3j74qh15ukk@4ax.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.dca3.giganews.com!border2.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!news.snarked.org!pool-71-106-211-51.lsanca.dsl-w.verizon.net!not-for-mail Newsgroups: news.software.nntp Lines: 54 Reply-To: "D. Stussy" <replies@newsgroups.kd6lvw.ampr.org> Injection-Date: Tue, 9 Aug 2011 06:40:12 +0000 (UTC) Injection-Info: snarked.org; posting-host="pool-71-106-211-51.lsanca.dsl-w.verizon.net:71.106.211.51"; logging-data="20077"; mail-complaints-to="newsmaster+complaints@snarked.org" X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1478 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478 X-Original-Bytes: 3862