I have fixed the bug that was causing the ridiculous slowdown when viewing member profiles. It turns out that a particular WHERE clause in one of the queries was slowing things down too much, and after catching the culpreit, I was able to perform the query in PHP instead.
Dani
4,064
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Recommended Answers
Jump to PostHmm.. so was it the number of round trips made to the database or a logic problem ?
Jump to PostOkay so it was like 'performing operations which should never have been perfomed by the sql' sort of thing.
BTW indexing doesn't account for bad code you know...;)
Jump to PostI certainly don't think it would be traversing the table twice, but I guess you know your tools the best.
BTW why not just use a simple IN clause ?
Jump to PostI'm thinking it would traverse all rows eliminating those where column is 123, and then go back on all of the others and check whether the value of column is in the array, so essentially that's going over nearly everything twice, no?
So you mean to say that every condition …
All 15 Replies
Dani
4,064
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
~s.o.s~
2,560
Failure as a human
Team Colleague
Featured Poster
Dani
4,064
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
~s.o.s~
2,560
Failure as a human
Team Colleague
Featured Poster
Dani
4,064
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
~s.o.s~
2,560
Failure as a human
Team Colleague
Featured Poster
Dani
4,064
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
~s.o.s~
2,560
Failure as a human
Team Colleague
Featured Poster
Dani
4,064
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Dani
4,064
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Dani
4,064
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
~s.o.s~
2,560
Failure as a human
Team Colleague
Featured Poster
Dani
4,064
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
jbennet
1,618
Most Valuable Poster
Team Colleague
Featured Poster
Dani
4,064
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.