SQL speed on non-pk'd tables - نوشته شده در (3593 Views)
Average Member
SiSL
مطلب: 671
671
Greetings,

I'm wondering if there is any way to speed up tables with no-primary keys (you know tables inserting records non-stop and deleting) where int or bigint will be a problem....where you store massive number of records that may change during... eg. like Active_users table

Since yesterday hit over 25K active at same time, 194K overall visit, I think one of reasons for that to update that file while users changing pages.

 پیش‌فرض مرتب‌سازی برای تاریخ DESC به معنی جدیدترین است  
 تعداد در صفحه 
نوشته شده در
Snitz Forums Admin
ruirib
مطلب: 26364
26364
I guess the question is how those tables are accessed and what type of performance problems you're experiencing.
نوشته شده در
Average Member
SiSL
مطلب: 671
671
Well, you know Active_Users table of Snitz. Very same :)
My performance problem is while users of 24K around same periods access data as they change pages, active users change pages as well.. So around 24K queries on a no-PK'd table sadly in less than 20 minutes periods.
نوشته شده در
Snitz Forums Admin
ruirib
مطلب: 26364
26364
In what pages does that slow you down? Every page? Active users page?
نوشته شده در
Average Member
SiSL
مطلب: 671
671
Every page that calls activepages function (you know the function that adds users to list if they are not, or changes their location if they were already in the table)
Not listing or anything.
نوشته شده در
Snitz Forums Admin
ruirib
مطلب: 26364
26364
Well I will try to have a look at what it does.
نوشته شده در
Average Member
SiSL
مطلب: 671
671
Thank you, it is in general, massive files with no PK naturally takes a lot more to operate. I was wondering if there are other options for such "log-style" tables to operate quicklier if given paramaters good enough.
نوشته شده در
Snitz Forums Admin
ruirib
مطلب: 26364
26364
Forgot this, Selçuk, sorry. Only remembered it by seeing your latest post. Please bump it if I say nothing else today...
نوشته شده در
Snitz Forums Admin
ruirib
مطلب: 26364
26364
Try adding an index to the MEMBER_ID field and another to the AU_IP field. Both should be non clustering indexes. This should speed getting table data and deleting members, but it may slow adding members to the list...
Let me know if it makes any difference.
نوشته شده در
Average Member
SiSL
مطلب: 671
671
شما باید یک متن وارد کنید