githubbob42 / mingle2github2

0 stars 1 forks source link

Optimize queries for scheduling data #2922

Closed githubbob42 closed 9 years ago

githubbob42 commented 9 years ago

Mingle Card: 3216

| | |
|-|-|
|Pull Request:|

   [1353](https://github.com/Liquidframeworks/alpine-mobile/pull/1353)|

    |
|[Push to Site fxqa1](http://buildslave3.basecamp.liquidframeworks.com:5000/requestQAbuild?qaSite=fxqa1&repoUrl=https%3A%2F%2Fgithub.com%2Fpixel9%2Falpine-mobile&branch=mingle3216&repoName=alpine-mobile&repoOwner=Liquidframeworks&cards=%5B%7B%22projectName%22%3A%22alpine_mobile%22%2C%22cardNumber%22%3A%223216%22%7D%5D&requestNumber=1353&requestUrl=https%3A%2F%2Fgithub.com%2FLiquidframeworks%2Falpine-mobile%2Fpull%2F1353)|
|[Push to Site fxqa2](http://buildslave3.basecamp.liquidframeworks.com:5000/requestQAbuild?qaSite=fxqa2&repoUrl=https%3A%2F%2Fgithub.com%2Fpixel9%2Falpine-mobile&branch=mingle3216&repoName=alpine-mobile&repoOwner=Liquidframeworks&cards=%5B%7B%22projectName%22%3A%22alpine_mobile%22%2C%22cardNumber%22%3A%223216%22%7D%5D&requestNumber=1353&requestUrl=https%3A%2F%2Fgithub.com%2FLiquidframeworks%2Falpine-mobile%2Fpull%2F1353)|
|[Push to Site fxqa3](http://buildslave3.basecamp.liquidframeworks.com:5000/requestQAbuild?qaSite=fxqa3&repoUrl=https%3A%2F%2Fgithub.com%2Fpixel9%2Falpine-mobile&branch=mingle3216&repoName=alpine-mobile&repoOwner=Liquidframeworks&cards=%5B%7B%22projectName%22%3A%22alpine_mobile%22%2C%22cardNumber%22%3A%223216%22%7D%5D&requestNumber=1353&requestUrl=https%3A%2F%2Fgithub.com%2FLiquidframeworks%2Falpine-mobile%2Fpull%2F1353)|
|[Push to Site fxqa4](http://buildslave3.basecamp.liquidframeworks.com:5000/requestQAbuild?qaSite=fxqa4&repoUrl=https%3A%2F%2Fgithub.com%2Fpixel9%2Falpine-mobile&branch=mingle3216&repoName=alpine-mobile&repoOwner=Liquidframeworks&cards=%5B%7B%22projectName%22%3A%22alpine_mobile%22%2C%22cardNumber%22%3A%223216%22%7D%5D&requestNumber=1353&requestUrl=https%3A%2F%2Fgithub.com%2FLiquidframeworks%2Falpine-mobile%2Fpull%2F1353)|
|[Push to Site fxsignoff1](http://buildslave3.basecamp.liquidframeworks.com:5000/requestQAbuild?qaSite=fxsignoff1&repoUrl=https%3A%2F%2Fgithub.com%2Fpixel9%2Falpine-mobile&branch=mingle3216&repoName=alpine-mobile&repoOwner=Liquidframeworks&cards=%5B%7B%22projectName%22%3A%22alpine_mobile%22%2C%22cardNumber%22%3A%223216%22%7D%5D&requestNumber=1353&requestUrl=https%3A%2F%2Fgithub.com%2FLiquidframeworks%2Falpine-mobile%2Fpull%2F1353)|
|[Push to Site fxsignoff2](http://buildslave3.basecamp.liquidframeworks.com:5000/requestQAbuild?qaSite=fxsignoff2&repoUrl=https%3A%2F%2Fgithub.com%2Fpixel9%2Falpine-mobile&branch=mingle3216&repoName=alpine-mobile&repoOwner=Liquidframeworks&cards=%5B%7B%22projectName%22%3A%22alpine_mobile%22%2C%22cardNumber%22%3A%223216%22%7D%5D&requestNumber=1353&requestUrl=https%3A%2F%2Fgithub.com%2FLiquidframeworks%2Falpine-mobile%2Fpull%2F1353)|

    |

Narrative

Ticket item picker is slow with very large numbers of contacts/equipment because we search for a matching pricebook item on the current pricebook for each record.

Use projections to fetch a sparse data set to filter contacts/equipment down to those that are contained in the current pricebook. In other words, instead of querying the pricebook store for each contact/equipment record to see if one exists, make a single query to synchronously filter the entire data set using a list of ids.

This change also opens up the possibility of further performance improvements when we implement paging on the ticket item picker

Acceptance Criteria

Ticket item picker works the same (and faster particularly on iPad)

Related Stories

Tasks

{{table query: SELECT Number, Name, Owner, 'Task Status' WHERE Type = Task and Story = THIS CARD}}

Defects

{{ table query: SELECT Number, Name, Owner, 'Status' WHERE Type = Defect and 'Related Story' = THIS CARD }}

Test Plan

Test Case: Verify that user can add a ticket item to a ticket

githubbob42 commented 9 years ago

Anshuman : 02/24/2015 13:33 CST Taking a lot of time in IPad to open the price book item picker

githubbob42 commented 9 years ago

Pull Request #1353