Title: Calling Database table rows
Last modified: August 30, 2016

---

# Calling Database table rows

 *  [Purple-Chicken](https://wordpress.org/support/users/purple-chicken/)
 * (@purple-chicken)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/calling-database-table-rows/)
 * Hi, not use if this is in the right place but i need help.
 * I have a them that collects information (locations (country, state, city)) but
   every-time you use it loads all rows (currently 12000) is there a way to make
   it only load say 20 rows?
 * Not sure if that made sense so to put it in another way imagine if you had 12,000
   posts and each time you clicked the posts link from the dashboard you had to 
   wait for wordpress to load all 12,000 posts before you could do anything? Well
   that kind of my problem – anyone have any ideas?
 * Many Thanks in Advanced

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [VisualData](https://wordpress.org/support/users/visualdata/)
 * (@visualdata)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/calling-database-table-rows/#post-6397691)
 * Hi there,
 * Have you found a solution yet? What theme are you using and what options are 
   available for configure in the theme settings?
 *  [GMatter](https://wordpress.org/support/users/gmatter/)
 * (@gmatter)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/calling-database-table-rows/#post-6397692)
 * I don’t know if this will be of any use to you, but as far as i am aware, it 
   will depend on how the theme is requesting the data from your data base, from
   what i know(may be outdated), it will pass a list of criteria to the database
   which will then return all of the data that matches this as a data-set. If the
   criteria it sends relates to 12000 records then it would return that many, but
   if it only related to say 3, that’s all it would return. This means it would 
   depend what data it is requesting from the database, if it is requesting data
   about location, all records that have matching location data will be returned.
   I’m not sure how you would tackle this to find a work around, but from what i
   can infer, i think it is something to do with the data being requested, so changing
   that would change the amount of records being returned?
 *  [VisualData](https://wordpress.org/support/users/visualdata/)
 * (@visualdata)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/calling-database-table-rows/#post-6397693)
 * Hi,
 * It is possible to specify how many records to return by running a customised 
   query. Sorry are you a developer of themes, or a user of a theme? Please provide
   more specific information about the problem so someone can help.
 *  [GMatter](https://wordpress.org/support/users/gmatter/)
 * (@gmatter)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/calling-database-table-rows/#post-6397694)
 * As far as i am aware(like i said my knowledge may be outdated) it is not possible
   to specify the amount of records that are returned, but instead it returns all
   data which meets the criteria. But as always there will be work arounds or other
   approaches which may give a desired effect. What i have to ask though, with your
   second example of clicking the link to a post and having to wait for all posts
   to load – when you click the link to a post it will take you directly to that
   post and hence you will not need all of the posts to load first, the database
   would just be searched for that specific post and then that post loaded. If this
   was put into action with your first example, if you already had a good idea of
   what information you want to search for, there would surely be a way to apply
   a filter to your search much like the idea of location, but instead of just saying‘
   return all data with a location’ you say ‘return all data with a location of [
   placename]’ (admittedly it wouldn’t be quite as easy as that as you’d have to
   put it into code, but that would definitely be possible). This would massively
   reduce loading times, so really you want to build/have some sort of filter system
   built (Or at least that is my opinion).

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Calling Database table rows’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [GMatter](https://wordpress.org/support/users/gmatter/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/calling-database-table-rows/#post-6397694)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
