Showing posts with label sanity. Show all posts
Showing posts with label sanity. Show all posts

Wednesday, March 7, 2012

Sanity Check: Measure Expression nearly always better than Calculated Measure?

Hey All --

From what I've read, Measure Expressions are generally superior to Calculated Measures because we can actually aggregate them. Most of the examples of Measure Expressions I've seen are something along the lines of [Measures].[Sales] / [Measures].[Sales Cost]...Both values are part of various measure groups.

I assume that even if I 'hard code" a value as in the following example my performance is STILL going to be much better in a measure expression (assuming we take advantage of aggs) than doing the same thing in a calculated measure:

[Measures].[Sales SubTotal] * 1.08 //Sales Tax)

So, I guess the question I'm asking is: Must a "valid" measure expression include ONLY measures and operators, or can it include any hard coded constant value I want to stick in, as well...And if the latter situation is "OK", we still get all of our perf benefits, etc.

Thanks!

The best thing to do would be to give it a shot with both approaches and see which works best for you. Look at both query response time and processing time impacts.

The SSAS 2005 Performance Guide suggests this is an optimal solution when working with data from multiple measure groups ... which is the case you identify above. Again, try it and see.

The easiest way to compare the two would be to go ahead and create the Measure Expression, process your cube, execute an MDX query to return data from the measure with the defined measure expression. Then, recreate the calculation in a WITH MEMBER clause of another MDX statement and compare its execution time to the original.

Good Luck,
Bryan

Sanity Check/Question About Idea

OK can someone look at this idea and tell me if it sounds like it would be work and be a good way to do things

On our Virtual Server machine I have 4 Server's setup. All Running Windows 2003 Standard.

Server1 - SQL Server 2005 Standard

Server2 - SQL Server 2005 Standard

Server3 - SQL Server 2005 Express

Server4 - SQL Server 2005 Express

Now I would have Server1 & Server2 in a DB Mirror Mode. With Server3 being the witness. When Server1 Fails Server3 would tell Server2 to become primary. Then when Server1 comes back it gets updates from Server2 and vice versa if Server2 fails.

Now Server4 I was hoping to remove some of the processing that is done (currently via DTS in SQL 2000). This scheduled jobs will get the updates from another system process them and then push the changes to either Server1 or Server2 depending on who is the primary at the time.

Does this sound like it would work? Is this a solid idea in making the DB's available witha 99.9% uptime?

Um...not really. If you lose the machine, you have lost all 4 virtual machines in one shot.

As far as the Database Mirroring piece of the question goes, that is exactly how it will work.

|||Ohh as for loosing the VM server... They are purchasing 3... 2 for production and failover and 1 for DR... So I am not seeing the VM system dieing... But what I said above is correct with the correct versioning and stuff?|||You have me completely confused then. You run a virtual machine on top of a copy of Windows which is on top of a single physical machine. If you load up 2 virtual machines on a single piece of hardware, lose the hardware and you've lost both VMs at the same time. Additionally, you are gaining absolutely nothing. You are being forced to run two copies of the OS - one host and one in the VM to then run SQL Server which is also going to have the effect of doing 100% of its work back into one or more files on the host machine. An extremely inefficient way to configure anything.|||OK ignore the VM server... It is VMWare setup... We have 3 instances of Windows installed. The VMWare has failover in the event hardware dies it can move the host (The Windows instance) to the other peice of hardware. So that is least of my concern... What I am trying to account for is if the Service dies... I think I have it figured out... Best thing for me to do really is wait for everything to get setup and try it..|||Hope you're not planning on having the VMWare fail over the SQL Servers. You may end up with damaged databases. You can't copy a live database without checkpoints.

Sanity Check/Question About Idea

OK can someone look at this idea and tell me if it sounds like it would be work and be a good way to do things

On our Virtual Server machine I have 4 Server's setup. All Running Windows 2003 Standard.

Server1 - SQL Server 2005 Standard

Server2 - SQL Server 2005 Standard

Server3 - SQL Server 2005 Express

Server4 - SQL Server 2005 Express

Now I would have Server1 & Server2 in a DB Mirror Mode. With Server3 being the witness. When Server1 Fails Server3 would tell Server2 to become primary. Then when Server1 comes back it gets updates from Server2 and vice versa if Server2 fails.

Now Server4 I was hoping to remove some of the processing that is done (currently via DTS in SQL 2000). This scheduled jobs will get the updates from another system process them and then push the changes to either Server1 or Server2 depending on who is the primary at the time.

Does this sound like it would work? Is this a solid idea in making the DB's available witha 99.9% uptime?

Um...not really. If you lose the machine, you have lost all 4 virtual machines in one shot.

As far as the Database Mirroring piece of the question goes, that is exactly how it will work.

|||Ohh as for loosing the VM server... They are purchasing 3... 2 for production and failover and 1 for DR... So I am not seeing the VM system dieing... But what I said above is correct with the correct versioning and stuff?|||You have me completely confused then. You run a virtual machine on top of a copy of Windows which is on top of a single physical machine. If you load up 2 virtual machines on a single piece of hardware, lose the hardware and you've lost both VMs at the same time. Additionally, you are gaining absolutely nothing. You are being forced to run two copies of the OS - one host and one in the VM to then run SQL Server which is also going to have the effect of doing 100% of its work back into one or more files on the host machine. An extremely inefficient way to configure anything.|||OK ignore the VM server... It is VMWare setup... We have 3 instances of Windows installed. The VMWare has failover in the event hardware dies it can move the host (The Windows instance) to the other peice of hardware. So that is least of my concern... What I am trying to account for is if the Service dies... I think I have it figured out... Best thing for me to do really is wait for everything to get setup and try it..|||Hope you're not planning on having the VMWare fail over the SQL Servers. You may end up with damaged databases. You can't copy a live database without checkpoints.

Sanity check of data model

Hi, new to this forum. I have a data model that I'm curious about, because it has a structure that's new to me:

TableA -- TableB -- TableD
TableA -- TableC -- TableD

TableB and TableC each model a many-to-many relationship between TableA and TableD.

In addition to being new to me, it might also be the causing us problems with our code generator (a product called .netTiers).

Anyone used this construct before, or suggest an alternative?

Dave

P.S. Data model is attachedI'd go with one joining table:

SampleID
SampleType ("Face", "Voice")
BiometriceTemplateID
MediumID