Welcome Guest, Not a member yet? Register   Sign In
Query time out with concurrent access-Please help
#1

[eluser]OJ[/eluser]
Guys,
In my website I did not use CI core libraries to generate my queries but have implemented them nicely, I guess Smile

My concern is that since traffic is increasing in my website, I have started seeing query timeout errors. The annoying thing is that my code displays all my query to the user when mysql times out.
Is this something that can be addressed at my ISP level or do I need to make a change
to my code?

Here is what my query does:
It goes to each category of products to count all the items in each category. Each product category is a table in the DB. Not sure if this is a good idea but the thinking is that for a quick response fetching from one table with few rows will be better that joining 2 or more tables to get same information.
The challenge is that :
To display all the items in each category, I have to loop through all tables(categories) to get a count to display against the categories e.g. Jobs(9234)
To search for a keyword across all categories, I have to loop through all the tables to find a matching record, use union to merge all the records and sort them by post date.
Do I have a bad design?
Is there concurrency built with CI
Someone please help!!

Cheers,
OJ




Theme © iAndrew 2016 - Forum software by © MyBB