Advertisement:

Author Topic: Unique link adress of the message  (Read 10572 times)

Offline gri

  • Full Member
  • ***
  • Posts: 553
  • Space Human
Unique link adress of the message
« on: April 17, 2005, 07:57:06 AM »
The subheader of each posting has the link to the posting.
It contains both topic number and message number.

After posting the message.. a user (or any other users)
may locate multiple links to the posted message
in his (or their) other postings in different topics..
of various forums.

Later the original posting may be accidentally splitted
to another thread and the link to it will change the topic number.
In this case all previous links to the original posting
become inoperable as if the posting was removed
(and it was really removed from the original topic..
but not from the forum).

To overcome this uncomfortable consequence of splitting
the link must not contain the topic number.
It must contain only unique message number.

The same uniqueness and independance from the topic number
is needed also in the quotation link to the original posting..

along with the global quoting feature.
« Last Edit: April 17, 2005, 12:26:27 PM by gri »

Offline Yonkey

  • Jr. Member
  • **
  • Posts: 249
  • Gender: Male
    • The Silver Lining
Re: Unique link adress of the message
« Reply #1 on: April 17, 2005, 12:53:41 PM »
You make a good point...

However, if the forum did this, it would become much slower.  In order to display any topic, it would have to search through all messages before it for that specific message.  For example, if you had 100,000 posts in your forum, and posted a new one with the unique message id 100001, the forum has to look through 100,000 posts to find it. 

When you have the topic id, you aren't searching through all messages.  You're only searching messages with a certain ID_TOPIC.  Unless you have 100,000 topics with one post each, the performance will always be faster to search by topic ID, or board ID than by message ID alone.

Offline gri

  • Full Member
  • ***
  • Posts: 553
  • Space Human
Re: Unique link adress of the message
« Reply #2 on: April 17, 2005, 01:15:48 PM »
You make a good point...
For example, if you had 100,000 posts in your forum, and posted a new one with the unique message id 100001, the forum has to look through 100,000 posts to find it. 

A what ??

Has not SMF "message number" field to be indexed ?

I don't believe this.

« Last Edit: April 17, 2005, 06:04:34 PM by gri »

Offline Yonkey

  • Jr. Member
  • **
  • Posts: 249
  • Gender: Male
    • The Silver Lining
Re: Unique link adress of the message
« Reply #3 on: April 17, 2005, 01:36:40 PM »
I may be wrong about that, since I'm not completely sure how MySQL indexes work on unique primary keys.  The SMF developers are free to correct me. :P

You're right that it has its own index, but right now is based on both: topic id and message id.  I believe the main reason for doing this was for performance.

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Unique link adress of the message
« Reply #4 on: April 17, 2005, 01:37:54 PM »
Well, doing a look up - even with an index - on a larger table is slower than one on a smaller table.

And, it would have to use the ID_BOARD, ID_MSG index - not the primary key.

-[Unknown]

Offline gri

  • Full Member
  • ***
  • Posts: 553
  • Space Human
Re: Unique link adress of the message
« Reply #5 on: April 17, 2005, 05:26:49 PM »
Well, doing a look up - even with an index -
on a larger table is slower than one on a smaller table.

And, it would have to use the ID_BOARD, ID_MSG index - not the primary key.

[Unknown],
it is great difference whether a key is indexed or not.

Well, doing a look up without an index key -
on a larger table is slower than one on a smaller table.

Doing a look up WITH an index key -
on a larger table is comparative with the one on a smaller table.

Once more - Is ID_MSG indexed ?


It is a question which search time is less..

I think that a look up through the complex index "ID_BOARD, ID_MSG"
(although both keys are indexed of course)
is slower than through the only indexed key
with unique feature.

[Unknown],
Is it possible to make "ID_MSG" to be the only indexed key
and then to test on the same base
the look up time ?

It is interesting to compare the time of look up..
before to continue guessing.
« Last Edit: April 17, 2005, 05:35:59 PM by gri »

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Unique link adress of the message
« Reply #6 on: April 17, 2005, 06:51:29 PM »
Well, doing a look up without an index key -
on a larger table is slower than one on a smaller table.

That is true.

Quote
Doing a look up WITH an index key -
on a larger table is comparative with the one on a smaller table.

That is incorrect.  Indexes are not magic.  They are faster, but a very large table (meaning many rows) still slows them down.  The data still has to be there.

Quote
Once more - Is ID_MSG indexed ?

Yes.

Quote
Is it possible to make "ID_MSG" to be the only indexed key
and then to test on the same base the look up time ?

No, that is a bad idea.  Removing all the indexes except the primary key from the messages table would be a fool's move.

-[Unknown]

Offline gri

  • Full Member
  • ***
  • Posts: 553
  • Space Human
Re: Unique link adress of the message
« Reply #7 on: April 17, 2005, 08:26:18 PM »
No, that is a bad idea.  Removing all the indexes except the primary key from the messages table would be a fool's move.

-[Unknown]

[Unknown],
Thank you.

Now i understand that IPB developers
using such link format

" http://forum.votkinsk.net/index.php?act=findpost&pid=92720 "

are the most fools on the planet.

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Unique link adress of the message
« Reply #8 on: April 17, 2005, 10:32:18 PM »
The Invision developers have not removed all the indexes on the table.  I don't think you understand me.

-[Unknown]

Offline gri

  • Full Member
  • ***
  • Posts: 553
  • Space Human
Re: Unique link adress of the message
« Reply #9 on: April 18, 2005, 01:52:22 AM »
The Invision developers have not removed all the indexes on the table.  I don't think you understand me.

-[Unknown]

Is it possible to link the same way in SMF ?

Offline gri

  • Full Member
  • ***
  • Posts: 553
  • Space Human
Re: Unique link adress of the message
« Reply #10 on: April 18, 2005, 01:53:01 AM »
[Unknown],
there is an example of inoperable quote link in my posting
which have become inoperable because of its moving by a moderator

<< http://www.simplemachines.org/community/index.php?topic=33460.msg248584#msg248584 .

Was not that a fool's move ?

Soon after moving.. the topic was locked not by me.

Would you like to explain how can I correct any fool's mistake
in MY posting in the locked thread ?


The link from this posting will become inoperable
after the removing of the target posting (or splitting anywhere).

Similar the tens of links from other forums will become inoperable
after removing this posting.

So who is a fool ?
Am I a fool having posted to simplemachines forum ?

Let's ~Follow the Chief Logic~ to find out the fool.

Offline Ben_S

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,707
  • xxx
Re: Unique link adress of the message
« Reply #11 on: April 18, 2005, 08:05:00 AM »
You could use SSI.php to do it with the grab single message mod, eg http://www.redandwhitekop.com/article.php?id=951154
Liverpool FC Forum with 14 million+ posts.

Offline gri

  • Full Member
  • ***
  • Posts: 553
  • Space Human
Re: Unique link adress of the message
« Reply #12 on: April 19, 2005, 12:33:25 AM »
You could use SSI.php to do it with the grab single message mod, eg http://www.redandwhitekop.com/article.php?id=951154

Ben_S,
I have not understood your link
~ http://www.redandwhitekop.com/article.php?id=951154 ~.

I am requesting for the similar link format
but to the posting
not to an article.

P.S.
What is ~SSI.php~ ?

Offline andrea

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,324
  • Gender: Female
  • I'm a smiley.
    • Smiley Sets
Re: Unique link adress of the message
« Reply #13 on: April 19, 2005, 12:52:09 AM »
[Unknown],
there is an example of inoperable quote link in my posting
which have become inoperable because of its moving by a moderator

<< http://www.simplemachines.org/community/index.php?topic=33460.msg248584#msg248584 .

Was not that a fool's move ?

Soon after moving.. the topic was locked not by me.

Would you like to explain how can I correct any fool's mistake
in MY posting in the locked thread ?


The link from this posting will become inoperable
after the removing of the target posting (or splitting anywhere).

Similar the tens of links from other forums will become inoperable
after removing this posting.

So who is a fool ?
Am I a fool having posted to simplemachines forum ?

Let's ~Follow the Chief Logic~ to find out the fool.


Look gri, it does not help to go offtopic in every thread and to bully programmers and the support people in every thread - just because they try to maintain the forum readable.

If you post offtopic then a thread has to be split, as was done with the thread you linked above. And because of your bad behaviour that mentionned splitted thread had even to be locked.

It would be nice if you would keep a positive and polite attitude in this community.

You force me to lock this topic - because (again) you have lead a thread into a dead point. - topic locked
« Last Edit: April 19, 2005, 12:58:15 AM by andrea »
Andrea Hubacher
Ex Lead Support Specialist
www.simplemachines.org

Personal Signature:
Most recent work:
10 Aqua Themes for SMF