Help: Working with big database

Started on the old forum in September 2011 · view the original in the archive · old links redirect here

2 replies · 418 views · started 15 years ago · 1 min read

2 participants
Mysterio Lead · 630 posts #1

Hello all,

I am having this kind of problem:

I have a table which have 7000 rows, and those rows are articles. This means, each row contains a title, content, keywords, description, and many different statistics. My problem is that, in the main page (homepage) I must query six times to this table, because I have to display top 3 most readed articles (order by content.views), last added and last updated (content.addedtime and content.updatedtime), and so on for some other fields.

Doing all this takes a lot of time, and soon, articles will be up to 10000 and more.

What do you suggest me? Maybe fetching all table to a multidimensional array? How to work with it later? What about array_multisort()?

p.s. I don't want someone to do my work, I just want suggestions.

Thanks!

mysterio.al - programming is a functional art

Mysterio Lead · 630 posts #3

None except standalone answered? Thank you!

I solved it with array_multisort()

mysterio.al - programming is a functional art

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close