Algorithm For Large Scale Data Analysis