Permissions/Authorization database changes.

Discussion of general topics related to the new version and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Post Reply
just_testing_attachments
Registered User
Posts: 2
Joined: Thu Sep 09, 2004 9:37 pm

Permissions/Authorization database changes.

Post by just_testing_attachments »

Sorry, I searched for everything I could think of but couldn't find anything related to this...

I am curious, has anyone looked at the size of the database when there is just a single user? We're talking 100s of tables for the permissions to a single forum (well, 2 counting the category). Doesn't this seem like something that is going to get out of hand very quickly? The data in each table row is relatively small (a few integers it looks like) but if it the database is looking through 100,000,000 rows to find matches for queries isn't that going to slow things down considerably?

If this forum is using the same authorization system, what kind of database is it running on? Has anyone monitored performance and seen any kind of spikes when the database is accessed? I haven't looked at the code but I'm guessing there's some caching going on with that kind of info...

User avatar
Ptirhiik_
Registered User
Posts: 526
Joined: Tue Nov 18, 2003 8:35 am

Re: Permissions/Authorization database changes.

Post by Ptirhiik_ »

The auts size depends the way you define the auths. With a good strategy (using appropriate groups so), you won't probably get over a 1000 rows for the auths table.

User avatar
psoTFX
Registered User
Posts: 1984
Joined: Tue Jul 03, 2001 8:50 pm
Contact:

Re: Permissions/Authorization database changes.

Post by psoTFX »

I really am unsure what you're discussing ... 100's of tables? I assume you mean fields? The permissions tables are not queried all that frequently. Permissions are calculated and stored in each users field. They are only recalculated when a permission is altered.

Martin Blank
Registered User
Posts: 687
Joined: Sun May 11, 2003 11:17 am

Re: Permissions/Authorization database changes.

Post by Martin Blank »

just_testing_attachments wrote:Has anyone monitored performance and seen any kind of spikes when the database is accessed? I haven't looked at the code but I'm guessing there's some caching going on with that kind of info...
You can do some checks on your own. The database is queried (virtually?) every time a page loads. At the bottom of each page is the time that it took to generate the page, as well as the number of queries made. I imagine that this is a middling-sized board as they go, and it's relatively quick. The code in the past has scaled sufficiently to have fairly large boards running quickly, and I imagine it will be the same here.
You can never go home again... but I guess you can shop there.

just_testing_attachments
Registered User
Posts: 2
Joined: Thu Sep 09, 2004 9:37 pm

Re: Permissions/Authorization database changes.

Post by just_testing_attachments »

Yes, I did mean 100s of rows, sorry. I didn't look at all the database info I should have (read: where the permissions are stored under the user table). One more question: How close to being finalized would you say the database structure is? I know there is no 'official' date when 2.2 will be released and we (the peons) won't know everything it will do until then, but I'd like to know if there are some other major changes that are going to be made to the overall db structure (e.g. added tables allowing uplodads directly to the database or removing a table altogether).

Smirnov
Registered User
Posts: 14
Joined: Thu Mar 21, 2002 12:14 am
Contact:

Re: Permissions/Authorization database changes.

Post by Smirnov »

With modern computers and a few indices, it takes about 0.001 seconds to scan through a few million rows ;).

Post Reply