[AngularJS] Re: data persistence

2019-08-08 Thread Vishal Kaushik


There are no wildcard searches. The search is based on selecting proper 
values from over 12 dropdown list. Sql Server is the database. I dont 
really have an issue except that i dont like current approach of hitting 
database for every 10 records. I want to be able to hold 1000+ records in 
memory and show those spread in 100 pages - 10 records per page. and if 
user wants to see more, then again hit the database to get another/next 
1000 records. 
Front end is Angular, which is calling .Net Rest APIs. These APIs connect 
to SQL via Entity Framework 6. 


On Thursday, 8 August 2019 00:19:41 UTC+5:30, Tito wrote:
>
> Answer this first. 
> 1. Are you doing any wild card searches.  
> 2. What backend is it?
>
> Your issue most probably is not angular. Sounds like backend issue
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/a445d113-5a4b-4d7e-9566-ba81baea9a11%40googlegroups.com.


[AngularJS] Re: data persistence

2019-08-07 Thread Vishal Kaushik
Its a search based on parameters selected by the user. There are about 10 
parameters. Not all searches lead to 2 million but worse case scenarios 
does. It uses restful API to pull records based on offset so it fetches 
only 10 records at a time based on page user is on and if user has clicked 
next or previous. Problem is hitting database on every 10 records. 
I would like to get about 1000 records at a time and then cache them 
locally somehow so I can use those to traverse thru those records without 
hitting the database. In return, this would substantially reduce the 
database calls. As I am new to Angular, I am not aware of possible features 
that can help me to implement my idea.

Pls suggest if you can think of something.

Thanks


On Wednesday, 7 August 2019 17:37:14 UTC+5:30, Tito wrote:
>
> Out of the 2 million records which ones are pertinent to the user?
> What kind of searches are you doing? Wildcard ```like '%search term%'
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/fda0cff6-2614-4e2c-9bde-077cb6730489%40googlegroups.com.


[AngularJS] data persistence

2019-08-07 Thread Vishal Kaushik

Hi guys,

I am kind of new to Angular and working on already developed Angular 2 + 
.Net Rest API project. There are quite a few search screens in my project 
which are getting page by page records. Rest API are getting data from SQL 
using entity framework. based on search parameters, the record count can go 
upto 2 million but getting 10 records at one time is slow for two reasons - 
1. the data in table is a lot (over 5 millions ) , 2. Hitting database for 
every 10 records do not make sense. 
So I want to change all the searches. My idea is to bring about 500 (or 
1000) records at once, and persist those records locally somehow. Instead 
of hitting database on every 10 records, I would like to let user move thru 
all 500 records ( 50 pages of 10 records each), then hit database for next 
500 records. I want to find out whats the best approach for doing this in 
Angular 2.

any guidance will be appreciated.

Thanks
KVishal

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/f06d6cef-b594-41d0-838e-73f993199d53%40googlegroups.com.


[AngularJS] Data Persistence

2019-08-07 Thread Vishal Kaushik
Hi Guys,

I am new to Angular and so please excuse if my question is too basic or 
asked in a wrong way.

I need to find a way to optimize Search screens where the data in tables is 
huge and its expansive to get data from database. The application is 
Angular 2+ .Net rest API which are using Entity framework to get data from 
sql database. Current implementation is to hit database for every 10 
records, and additionally hit database for getting search count so first 
time it hits twice. every 10 records, it hits the database for next 10 
records for advancing each page. 
I am hoping for an alternative approach where I could get say 1000 records 
at once and store them locally to show 100 pages (10 records each), and 
only moving to 101st page, it should go and hit database to get another 
1000 records based on search parameter ofcourse. I am looking for the right 
way of doing this. any guidance will be appreciated.

Thanks
Vishal

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/e2677f4f-ef6f-4b5b-ae79-1f6c5a219768%40googlegroups.com.