Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: buddy table  (Read 4685 times)

0 Members and 1 Guest are viewing this topic.

giorgio79

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 114
buddy table
« on: January 20, 2007, 05:27:01 am »

Hello,

I was just checking out the buddy table structure, and as I understand, there is a new row for every connection...

Would this slow down querying for a larger site with thousand of users, and tens of thousands of connections?

What do you think? Any experience with this?

Thanks,

Gyuri
Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: buddy table
« Reply #1 on: January 22, 2007, 09:19:07 am »

There's an index on the user id... so the search for all buddies of a certain user is pretty fast. A search for only one id of course would be faster. However with the actual system further preparation of the data is not necessary. No preg_match or ereg, no sorting of arrays, no joining data together to a string etc. I have a database to let do it the database stuff.

Of course you can rewrite the code and do the necessary data preparation. If it works fast and stable it's no problem to replace the existing code with yours.

giorgio79

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 114
Re: buddy table
« Reply #2 on: January 22, 2007, 01:33:30 pm »

Cheers Stramm!

Thanks for the kind explanation.

I broke up my questions on this topic to two threads to meet the one question per topic :) Hope this was OK.

I was checking out the code and there are only a few queries on the buddy table so I might rewrite those select statements as I have a networking site with a member table that has ids stored for a member in one field :)
Logged

giorgio79

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 114
Re: buddy table
« Reply #3 on: January 22, 2007, 03:35:12 pm »

Stramm, just one more question. if I would rewrite some of these queries, can I use the API for the Modpack as well?

I have read that it is not a good idea to change the core code...

Cheers,

Gyuri
Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: buddy table
« Reply #4 on: January 22, 2007, 03:47:01 pm »

Honestly, I do not know cause I never used the api... just try. But nothing would come to my mind that'll stop it from working
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.