Showing posts with label customer. Show all posts
Showing posts with label customer. Show all posts

Monday, March 26, 2012

Product Basket Problem

Hi,
I have to build a Poduct basket mining mode

Hi,

I have to build a Product basket mining mode such that when a customer selects

a product the model should be able to recommend him/her some more products.

I have a customer, product transaction table.

I have come across many typical examples where the output is

as follows

CustomerRecommended Products

Cust1a, b, c…….

Cust2e, b,

f……….

But I want the output of the model to be as follows

ProductRecommendedProducts

AB, C, D…….

BE, D, A…….

CD, A, F……

How should my mining model structure and the prediction

query look like?

Your model would look the same - all you would really want to do is to change how you query the model.

Essentially, the question you are asking is "if a customer bought product 'A', what other products might they buy". This is the same as "If customer 1 has product A in their basket, what products should I recommend." Therefore you need a query like this:

SELECT 'A' as [Product], Predict(Products,5) as [Recommended Products]
FROM MyRecommendationModel
NATURAL PREDICTION JOIN
(SELECT (SELECT 'A' as Product) AS Products) AS t

If you wanted to do this for all individual products, you would have to create a shaped input query from your product table. For example

SELECT t.Product, Predict(Products, 5) FROM [My Recommendation Model]
PREDICTION JOIN
SHAPE
{ OPENQUERY(MyDataSource],'SELECT Product FROM Products ORDER BY Product') }
APPEND
( {OPENQUERY([MyDataSource],'SELECT Product FROM Products ORDER BY Product'}
RELATE [Product] TO [Product])
AS [Products]
AS [t]
ON [My Recommendation Model].Products.Product=t.Products.Product

Friday, March 9, 2012

Process Throttling

A customer asked me at a recent TechNet Briefing:
"Are there “process throttling” capabilities? [Other database products]
have a way to watch for processes that run out-of-control…taking up too many
resource (CPU, Memory) from the rest of the system. I don’t see a way to do
it in 2000. If it's not there, will 2005 have a solution to this?"
Thanks
Kevin Remde
IT Pro Evangelist
Microsoft Corporation
Hi
sp_configure's 'query governor cost limit' can limit the time a quyery runs.
In terms of using other resources, they are ungoverned, even with SQL Server
2005.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Kevin Remde" <KevinRemde@.discussions.microsoft.com> wrote in message
news:A31687BA-155C-47F1-A5CF-538364183408@.microsoft.com...
>A customer asked me at a recent TechNet Briefing:
> "Are there "process throttling" capabilities? [Other database products]
> have a way to watch for processes that run out-of-control.taking up too
> many
> resource (CPU, Memory) from the rest of the system. I don't see a way to
> do
> it in 2000. If it's not there, will 2005 have a solution to this?"
> Thanks
> Kevin Remde
> IT Pro Evangelist
> Microsoft Corporation

Process Throttle?

Are there any new “process throttling” capabilities in SQL 2005? A customer of mine noted that that Oracle and others have a way to watch for and protect the system from processes that run out-of-control…taking up too many resource (CPU, Memory) from the rest of the system. He didn’t see a way to do it in SQL 2000 and is hoping that 2005 has a solution.

Thanks!
Kevin Remde

SQL Server 2005 does not have transparent resource management mechanism.

You can build your own custom query submission mechanism using, for example, Service Broker, however, once query is executed, the control over it is the same as in SQL Server 2000 (it is judged by the engine itself based on the cost, memory requested, etc.)

SQL Server 2005 uses advanced memory management and compilation throttling techniques to reduce number of out of memory errors due to different workloads, including runaway queries (there are caps on memory usage based on the amount of available and consumed memory). There is no CPU throttling at the query level.

You can use a set of DMVs to analyze and identify CPU/Memory consumption

|||

SQL Server 2005 added MAXDOP option to all index related DDL statements
(see CREATE/ALTER/DROP index and ALTER TABLE ADD/DROP index related constraint. It allows you to specify the degree of parallelism (CPU usage) in some important DDL operations such as index rebuild or index creation. In SQL Server 2000 the engine used all available CPUs.

Saturday, February 25, 2012

Process Cube

I have a cube with one customer count measure that use DistinctCount Aggregate Function. My testing Environment is Window Server 2003 x64 Sp1, 300 GB of Ram, and SQL 2005 EE. When I full process the cube, I use the MS Performance tool to monitor the MSAS:Proc Aggregations. I find out the Temp file bytes written/sec has been used, but the usage of the RAM never go above 15 GB. Why the temp file still in use. When I use AS2000 I know I can adjust the Process Buffer size to avoid the use of Temp file to increase the process performance. Should I take the same action in AS2005. But my OLAP\Process\BufferMemoryLimit has been set to 60 => 180GB can be use. Why temp file still in use? Should I adjust the OLAP\ProcessPlan\DistinctBuffer too that is the new item in AS2005?

Analysis Services 2005 is quite different in the way it does processing and manages memory.

First I would recommend you look at the performance guide for some clues on how to improve processing performance. I also not sure what the real concern is: is that your are seeing Analysis Server using less memory during processing? Is that you compare AS2000 and AS2005 and you are seeing slower processing performance?

Just to note, and you might know it alreday, processing of distinct count partitions is quite different from processing of regular partitions. Same goes for querying. Records stored in distinct count partitions as stored sorted. You can even see that for processing such partition Analysis Server will send different SQL query, it will ask data from SQL Server to come in sorted order.
What I am getting at is processing and querying of distinct count partitions is quite different from regular partitions. If you wanted to optimize processing and query performance the first and most important is to make sure your partition your cube along dimension that you get your distinct count for.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||my concern is how the memory usage in AS2005. Since my server has 300GB of memory, but AS2005 doesn't use up all the memory during the process, instead it use the Temp file that can slow down the process performance.