Title: Many database queries versus an array
Last modified: August 19, 2016

---

# Many database queries versus an array

 *  [gpaciga](https://wordpress.org/support/users/gpaciga/)
 * (@gpaciga)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/many-database-queries-versus-an-array/)
 * I’m developing a plugin which deals with relationships between the pages of my
   blog. Right now it’s set up so that it queries the database getting all the data
   it needs, but it needs to do this at least a few dozen times to get all the info
   it needs.
 * Is it better to query the database many times for specific pieces of data, or
   use something more general like get_results() to get a php array which will have
   all the data the function could possibly want?

The topic ‘Many database queries versus an array’ is closed to new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [get_results](https://wordpress.org/support/topic-tag/get_results/)
 * [MySQL](https://wordpress.org/support/topic-tag/mysql/)
 * [plugin-development](https://wordpress.org/support/topic-tag/plugin-development/)

 * 0 replies
 * 1 participant
 * Last reply from: [gpaciga](https://wordpress.org/support/users/gpaciga/)
 * Last activity: [18 years, 1 month ago](https://wordpress.org/support/topic/many-database-queries-versus-an-array/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
