vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Speedup IP Searching? (https://vborg.vbsupport.ru/showthread.php?t=92514)

edbri871 07-19-2005 07:46 PM

Speedup IP Searching?
 
Is there a way to speedup searching in the admincp by IP address?

I was looking to remove some from the database, but realized they are part of the posts table. :ermm:

The board has over 1,000,000 posts, and over 90,000 members altho a lot of those might be pruned soon.

Some ideas for improving the IP search in admincp would be great, or if I could be pointed to some mods for speeding it up that would be great too. :)

tamarian 07-19-2005 07:59 PM

Easy. If you have a lot of disk space, add an index to your post table on the ip address field. It will run real fast. Big board generally need this.

edbri871 07-19-2005 08:27 PM

Thanks for the reply. :)

Can you let me know a bit more about what this is going to do? How does it speed it up, and why will I need more disc space (i'll have to ask the board owner about that one)?

tamarian 07-19-2005 11:24 PM

Quote:

Originally Posted by edbri871
Thanks for the reply. :)

Can you let me know a bit more about what this is going to do? How does it speed it up, and why will I need more disc space (i'll have to ask the board owner about that one)?

Well, the post table is huge, usually the biggest in your vB database. If there is no index on the IP field, the query will have to search the entire post table, without an index. If you add an index by IP address, it will know where to look for, as they are already mapped. This will speed the IP search significantly. Without an IP index, your search will be slower as the post table gets bigger.

The disk space is required whenever you add an index, since the index will need to be stored on the hard disk. It will take a percentage of the size of the post table, so it's not too big (not bigger than the actual post table)

edbri871 07-19-2005 11:36 PM

OK Thanks a lot for your help. :D

I will go ahead and try this, then post back with the results. :)

It worked! :D Thanks a lot for the help!

beano33 07-21-2005 03:03 PM

Quote:

Originally Posted by edbri871
OK Thanks a lot for your help. :D

I will go ahead and try this, then post back with the results. :)

It worked! :D Thanks a lot for the help!

I could really use this too. Can you tell us exactly what you did? Thanks!

tamarian 07-21-2005 03:54 PM

Quote:

Originally Posted by beano33
I could really use this too. Can you tell us exactly what you did? Thanks!

To add an index on ip adresses in the post table, you can do it in a couple of ways.

1. If you have phpMyAdmin, just scroll and click on the post table, which will show the table's fields. Then on the ipaddress field, click the index button.

2. Or, from the admin panel MySQL tool, enter this query:
ALTER TABLE 'post' ADD INDEX ( `ipaddress` )
(add the table prefix to 'post' if you use one.

beano33 07-21-2005 05:40 PM

Thanks, it works great.

beano33 02-27-2006 07:58 PM

Is there a similar way to add an index to the table that's searched for users online? It would be nice to have it on without killing the server.


All times are GMT. The time now is 07:43 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01070 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete