Results 1 to 4 of 4

Thread: Database query/queries on listviews

  1. #1
    dricrm is offline Sugar Community Member
    Join Date
    Aug 2005
    Location
    Lisbon, Portugal
    Posts
    116

    Default Database query/queries on listviews

    Hi all,

    When sugar renders a listview for a user, does it fetch all the records from the database and cache them somehow (for when the user clicks next/previous) or does it do multiple queries, one per page?

    How about for search pages?

    Thanks for your help,
    diogo

  2. #2
    andydreisch's Avatar
    andydreisch is offline Sugar Team Member
    Join Date
    Apr 2005
    Location
    San Jose
    Posts
    2,080

    Default Re: Database query/queries on listviews

    Hi dricrm, ListViews are populated by chunks of results from the database. If you have a ListView that displays 20 records, the database will provide just 20 records' worth of data, even if the search criteria used could result in thousands of records.

    If you access the next page, the next set of 20 records are obtained from the database.

    If you re-access the first pages (records 1-20), a fresh database query is issued; we do not cache query results as obviously these can change.

    I'm not really clear on what you mean by "search pages" as ListViews implement search pages.

    Hope this helps,

    Andy
    Andy Dreisch
    Vice President, Online Team


    Check out our Podcasts!
    Sugar University for training
    Sugar Wiki for developer and user help
    SugarForge for modules, themes, lang packs
    SugarExchange for production-ready extensions
    Enter/view bugs via the Sugar bug tracker

  3. #3
    dricrm is offline Sugar Community Member
    Join Date
    Aug 2005
    Location
    Lisbon, Portugal
    Posts
    116

    Default Re: Database query/queries on listviews

    It does!

    Thanks for your time.

    diogo

  4. #4
    andydreisch's Avatar
    andydreisch is offline Sugar Team Member
    Join Date
    Apr 2005
    Location
    San Jose
    Posts
    2,080

    Default Re: Database query/queries on listviews

    Happy to help.

    Cya,

    Andy
    Andy Dreisch
    Vice President, Online Team


    Check out our Podcasts!
    Sugar University for training
    Sugar Wiki for developer and user help
    SugarForge for modules, themes, lang packs
    SugarExchange for production-ready extensions
    Enter/view bugs via the Sugar bug tracker

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •