.:.:.:.:
RTTP
.
Mobile
:.:.:.:.
[
<--back
] [
Home
][
Pics
][
News
][
Ads
][
Events
][
Forum
][
Band
][
Search
]
full forum
|
bottom
Reply
[
login
]
SPAM Filter:
re-type this
(values are 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E, or F)
you are quoting a heck of a lot there.
[QUOTE]blah blah blah[/QUOTE] to reply to the_reverend.
Please remove excess text as not to re-post tons
message
[QUOTE="the_reverend:344514"]yes, and god forbid. it's cause there were holes in my database numbering scheme. originally, I had the top set to the mysql random ORDER BY rand() but with 200K+ entries in the database, it could take up to 15 seconds. so I was "smart" and got it down to .001 seconds. by saying "database what is the max number in the database" then I would randomly select a number between 0 and that max number. since there are holes in my databases, I would select the index one higher than this randomly selected number. problem: if there are holes... like there are before the catch22 picture, the angela rose picture, a god forbid picture and more, then there would be up to a 1300x chance that that picture would be selected. soooo.. what I did was rethink the database in regards to caching. so I went with the SQL command of selecting the entire pictures database. (this should always be cached anyhow). so what I do now is select all pictures in the database find the max picture index randomly select a picture from 0 to the max index number and then use the random number to index off the collection of all the pictures in the database. this runs around .2 second not bad, better than 15 seconds and better than the catch 22 picture showing up over and over.[/QUOTE]
top
[
Vers. 0.12
][ 0.005 secs/8 queries][
refresh
][