Welcome, Guest. Please Login or Register.
May 13, 2025, 06:23:29 PM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Announcments in all boards! « previous next »
Pages: 1 [2] Reply Ignore Print
Author Topic: Announcments in all boards!  (Read 1385 times)
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Announcments in all boards!
« Reply #15 on: April 07, 2003, 04:29:08 AM »
Reply with quote

Quote from: old dan on April 07, 2003, 04:12:39 AM
Quote from: [Unknown] on April 07, 2003, 03:54:35 AM

Your way would not be global - one board only.... that is, the OR would allow for a sticky on any ID_BOARD.

-[Unknown]

yes, using isSticky set to 2 would only allow the post to be an announcement post on the board it was written. I've done that. And it works fine, however, Nonya wants a global announcement mod. I really think it will be more involved and will probably need more than using isSticky and adding a query. As you have pointed out, that would be slower. And except for intimate moments, faster is better. ;D

What I meant was that this query:

SELECT something
FROM somewhere
WHERE ID_BOARD=$board
 OR isSticky=2
ORDER BY isSticky DESC, posterTime DESC

Would mean that it either had to be on this board, or a global sticky... that is,

Get something from somewhere...
IF the board is the board we are looking or... or the post is on ANY board, but is a global sticky...
And return the information with stickies on top, newest first.

Thus, this would almost be the fastest way - using only one query.

-[Unknown]
Logged
groundup
Disciple of Joe, Head Cleric
Mod Team
YaBB God
*****
Posts: 2983


Error 309: Please notify the administrator of this

WWW
Re:Announcments in all boards!
« Reply #16 on: April 07, 2003, 06:34:08 PM »
Reply with quote

BAM, unknown gave you 1/2 of the mod. Now all you have to do is add the option to post & modify and you are done. Or you can make it an admin option. You can do it in a lot of ways, 1 would be making the admin enter the id of the global sticky (fastest to mod).
Logged

http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
fastfinancialfreedom.org
Dataforce
Full Member
***
Posts: 171


Data-Host.co.uk

Re:Announcments in all boards!
« Reply #17 on: April 11, 2003, 10:34:44 PM »
Reply with quote

now all thats needed is for some1 to actually make this into a proper mod thats actually useable.

VBulletin achieved it, with little or no slowing down, so YaBB should be able to aswell.
Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Announcments in all boards!
« Reply #18 on: April 11, 2003, 11:01:52 PM »
Reply with quote

For reference, vBulletin uses a seperate table.

-[Unknown]
Logged
Nonya
Beta Tester
Sr. Member
****
Posts: 375


YaBBse Developer Wannabe!

ICQ - 172862020nonya69rs@hotmail.com WWW
Re:Announcments in all boards!
« Reply #19 on: April 12, 2003, 06:42:18 AM »
Reply with quote

Almost done just give me some few days  :P
Logged

Iridium
Full Member
***
Posts: 173


I'm a llama!

Re:Announcments in all boards!
« Reply #20 on: April 12, 2003, 02:27:44 PM »
Reply with quote

Once again, I see phrases such as "very slow" being tossed around, without any real evidence to back such claims.

As far as I could tell from looking at the MySQL documentation, there is nothing to indicate that using OR suffers any major speed penalties (although, common sense would say that it might, as it includes records, rather than excluding them, as using AND would.)

Of course, the next obvious step is to do a vaguely-controlled benchmark.
This involved selecting (and fetching into an array, so there was some PHP overhead) 30 rows from my YaBBSE Topics table (3500 rows) based on a simple ID_BOARD=xx and timing it over 5000 such selects/fetches. This was repeated, but including an OR isSticky=1.

As one might expect, the query that included the OR term was slower, but I hasten to add, only very marginally (we're talking less than 5% in repeated runs).

At this point, I noticed that I had missed the ORDER BY clause, and so re-ran the test including that. The results were somewhat surprising: with the OR isSticky=1 it was in fact a minimum of 25% faster than without. (This is slightly misleading, seeing as the table contains quite a few stickies, and the number of global stickies is probably going to be considerably fewer than the total number of normal stickies on all boards, so MySQL wouldn't be able to optimize the sorting quite as well).

In conclusion, it'd be really nice if people wouldn't exaggerate quite so much in, what are actually, complete assumptions about relative speeds (be it queries, string concatenation, or anything else). In fact, if you're going to make such wild claims, which seem to be based on some "expert knowledge" maybe it'd be a good idea to get just the slightest bit of real evidence first, then you wouldn't look like quite such a crappity smacktard! (which, thanks to the censor, sounds almost more amusing than the intended "fucktard")
« Last Edit: April 12, 2003, 02:29:21 PM by Iridium » Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Announcments in all boards!
« Reply #21 on: April 12, 2003, 08:38:28 PM »
Reply with quote

OR _is_ very slow.

My own benchmarks....

for ($i = 0; $i < 5000; $i++)
{
   mysql_query("
      SELECT ID_TOPIC
      FROM {$db_prefix}topics
      WHERE ID_BOARD=1
         OR isSticky=1
      ORDER BY posterTime DESC, isSticky DESC");
}
Took 0.75925397872925 seconds.

for ($i = 0; $i < 5000; $i++)
{
   mysql_query("
      SELECT ID_TOPIC
      FROM {$db_prefix}topics
      WHERE ID_BOARD=1
      ORDER BY posterTime DESC, isSticky DESC");
}
Took 0.65996193885803 seconds.

As you can see, it is a large bit faster.

Regardless, I never said it was too slow, just quite slow.

-[Unknown]
Logged
Iridium
Full Member
***
Posts: 173


I'm a llama!

Re:Announcments in all boards!
« Reply #22 on: April 12, 2003, 09:48:05 PM »
Reply with quote

Well, actually your post stated:
QuoteBecause OR is VERY VERY VERY slow.
When I see that, I think "my board is going to be unusable if I add this feature" (As I would imagine did the numerous other readers)

Unfortunately, your "benchmarks" are so artificial, and lacking in detail that I can't comment on them.
Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Announcments in all boards!
« Reply #23 on: April 12, 2003, 10:47:26 PM »
Reply with quote

Well, for the record I've been insulted enough that I won't write this mod.

-[Unknown]
Logged
old dan
Full Member
***
Posts: 191


Make music, not war.

WWW
Re:Announcments in all boards!
« Reply #24 on: April 12, 2003, 11:14:43 PM »
Reply with quote

Quote from: [Unknown] on April 12, 2003, 10:47:26 PM
Well, for the record I've been insulted enough that I won't write this mod.

-[Unknown]

Hey [Unknown], sorry if I insulted you, it wasn't intentional. However if you like I know some really good insults and would be willing to let you have them................... ;D ;D ;D

Logged

People who drink lite beer don't like the taste of beer; they just like to pee a lot
old dan
Full Member
***
Posts: 191


Make music, not war.

WWW
Re:Announcments in all boards!
« Reply #25 on: April 12, 2003, 11:15:15 PM »
Reply with quote

Quote from: Nonya on April 12, 2003, 06:42:18 AM
Almost done just give me some few days  :P
Looking forward to it. :)
Logged

People who drink lite beer don't like the taste of beer; they just like to pee a lot
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Announcments in all boards!
« Reply #26 on: April 12, 2003, 11:18:25 PM »
Reply with quote

Quote from: old dan on April 12, 2003, 11:14:43 PM
Hey [Unknown], sorry if I insulted you, it wasn't intentional. However if you like I know some really good insults and would be willing to let you have them................... ;D ;D ;D

Oh, don't worry.... you've never said anything that overly bothered me... I mean, okay some things a *little*, but not really.  What got me was this:

QuoteIn conclusion, it'd be really nice if people wouldn't exaggerate quite so much in, what are actually, complete assumptions about relative speeds (be it queries, string concatenation, or anything else). In fact, if you're going to make such wild claims, which seem to be based on some "expert knowledge" maybe it'd be a good idea to get just the slightest bit of real evidence first, then you wouldn't look like quite such a crappity smacktard! (which, thanks to the censor, sounds almost more amusing than the intended "crappity smacktard")

Which was _obviously_ aimed at me.  Sorry if I tried to be of help.  Won't do it again, Iridium.

-[Unknown]
Logged
Dataforce
Full Member
***
Posts: 171


Data-Host.co.uk

Re:Announcments in all boards!
« Reply #27 on: April 20, 2003, 11:27:14 PM »
Reply with quote

so any progress with this mod ?
Logged
Nonya
Beta Tester
Sr. Member
****
Posts: 375


YaBBse Developer Wannabe!

ICQ - 172862020nonya69rs@hotmail.com WWW
Re:Announcments in all boards!
« Reply #28 on: April 20, 2003, 11:39:32 PM »
Reply with quote

I'm still working , sorry i was busy the last few days i hadn't much time to complete it.
anyway,
i'll finsh it a.s.a.p  :)
Logged

Dataforce
Full Member
***
Posts: 171


Data-Host.co.uk

Re:Announcments in all boards!
« Reply #29 on: April 29, 2003, 06:18:48 PM »
Reply with quote

kk gd gd \o/
Logged
Pages: 1 [2] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Announcments in all boards! « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.170 seconds with 21 queries.