![]() |
Quote:
That is the only thing stopping me at this point as it only seems logical to have an index on a column that is frequently used. :confused: |
hmm, the question cannot be answered directly
but on the other hand, there are a lot of forums, which don't store the ips, and then and index wouldn't be of use as i posted above, and index also has negative aspects, if it wouldn't you could always index every single field ;) |
Quote:
Quote:
Quote:
|
Quote:
The default setting on vBulletin is to store IPs and not display them publicly. Most people don't change default settings so an index could help everyone. Quote:
|
Index added ... no ill effects found (other than me being unable to wait patiently while the alter table command ran). IP searches are much faster now... almost instantaneous.
|
If the vB team would add the index in an upcoming upgrade that upgrade would become problematic for large boards without the index. It has to be introduced very gently to not upset the customers.
|
ok question if i was to add this add an index to the IP address in the post table and if i upgrade when 3.6 comes out will there be any changes i need to do... just making sure down the line i dont get no errors thanks...
Quote:
also i seen this posted before is pauls the right one or is this one the right one? Code:
ALTER TABLE `post` ADD INDEX `ipaddress` ( `ipaddress` ) |
Pretty sure it's the second.
|
They work both. Note that you have to take care of adding the prefix if you use one.
|
If I may give a few highlights on indexes and databases (MySQL specifically a well since most of you use that one)
Indexes as Paul M indicated are not really harmful when not used, and are very useful when they are used (as Kevlar noticed). However, you should be aware of the downside of an unused index. 1. Indexes take time to create. Not only during altering a table but also whenever a new record is added to the table. So bear that in mind. Although, when adding a simple index like IP row index, the effect of it on insert is usually very mild. 2. Indexes do take space. Some more, some less. If you add more and more indexes, especially if they are not used, they can eventually take more space than the data itself. In some cases this is even the desired situation. 3. Indexes can corrupt. Although tables don't get corrupted on a daily basis (thank god), it can (and sometimes does) happen. The less indexes you have, the better in that respect . So I would say that if an index is not needed, don't add it. As for whether or not VB should add it.. if there are built-in features that do a cumbersome select on a field in what usually gets to be a big table, an index for the field is most likely needed. Lastly.. there is not much you can do though with regards to the regular full-text search on the database level. This is because databases were not really designed for FTS (FullText search) indexing. It works, but usually for small boards. When your board gets big, FTS will probably grind your servers down. In case you have that problem, a mod we developed for board owners can solve that problem, by using BoardTracker's search implemented into the board. You can check out boards.ie or rpg.net for examples which use it. |
All times are GMT. The time now is 07:39 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|