05 October, 2012

6 million Users & PayPlans

Today, we are moving one more step forward towards its improvement. One of our prominent customer Daniel who is using PayPlans subscription system on his site with having 6 million users. This mammoth figure helped us to discover some performance loopholes and motivate us to improve performance of PayPlans. A very common lines says “Necessity is the mother of invention” similarly, we got some performance issues and we fixed those very efficiently with-in very short period of span.  For resolving this, we have created various test cases and debugged the system to find out the root cause of the issue.

We feel proud to announce that PayPlans is well tested with 6 million users. From now, PayPlans will help membership website administrators to work smoothly with millions of users. This is a pretty significant number for most of the membership websites. Its exactly similar to a plant grown into a tree, a cub into a lion and a warrior with improved armor. This simply motivates every membership website administrator to increase their customer-base without switching to any premium-costing services even when they have huge customer-base.  

PayPlans has significant number of 3rd-party developers and they are very supportive and technically sound. For our technical followers we are happy to share some technical information which will help them to visualize how we improved performance of PayPlans :-

Problem description for Technical Followers:-

There are two tables which contains user related information, they are :-

  1. #__joomla_user_table and
  2. #__payplans_user_table

When we collect users related data then there are two very common requirements:-

  1. Collect single user record
  2. Collect multiple user records

Note:- These changes will not affect any 3rd party plugin or app. They will work same as previously.

For single user record :-

Before fix:-

We did left join of #__joomla_user_table and #__payplans_user_table and then got one record of user according to user_id. Please let me explain what was the problem with this case. Suppose, we have 10 lac records in #__joomla_user_table and 5 lac records in #__payplans_user_table, then left join will produce 5 lac rows. After that we select only 1 record from left-joined rows. Means for getting 1 record we everytime collect 5 lac rows and then select 1 record from those rows.

After fix:-

Now, for collecting 1 record we select one record from #__joomla_user_table and then 1 record from #__payplans_user_table. After collecting one-one records from both the tables then we apply left join on both the selected records. This fix will improve performance very much because we do not apply left-join on 10 lac x 5 lac users.

For multiple users records :-

Before fix:-

We did left-join of #__joomla_user_table with #__payplans_user_table, means if joomla_user_table has 10 lac records and payplans_user_table have 8 lac records then it will do left-join of both the tables and then return 8 lac records. This process took significant time.

After fix:-

We have removed left-join of #__joomla_user_table and #__payplans_user_table because in PayPlans we always work with only user_id and we do not need to collect details of #__payplans_user_table data everywhere for processing multiple records.

These fixes will allow us to faster task with huge improved performance. Every problem we face will exploit plenty of learning to us. This issue also gives us a very good lesson at the end.

Soon we will be coming up with more exciting updates and releases. Stay tuned with us.

Happy PayPlanning!

blog comments powered by Disqus