Search Results

Search found 1913 results on 77 pages for 'paul huff'.

Page 56/77 | < Previous Page | 52 53 54 55 56 57 58 59 60 61 62 63  | Next Page >

  • Query performs poorly unless a temp table is used

    - by Paul McLoughlin
    The following query takes about 1 minute to run, and has the following IO statistics: SELECT T.RGN, T.CD, T.FUND_CD, T.TRDT, SUM(T2.UNITS) AS TotalUnits FROM dbo.TRANS AS T JOIN dbo.TRANS AS T2 ON T2.RGN=T.RGN AND T2.CD=T.CD AND T2.FUND_CD=T.FUND_CD AND T2.TRDT<=T.TRDT JOIN TASK_REQUESTS AS T3 ON T3.CD=T.CD AND T3.RGN=T.RGN AND T3.TASK = 'UPDATE_MEM_BAL' GROUP BY T.RGN, T.CD, T.FUND_CD, T.TRDT (4447 row(s) affected) Table 'TRANSACTIONS'. Scan count 5977, logical reads 7527408, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'TASK_REQUESTS'. Scan count 1, logical reads 11, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. SQL Server Execution Times: CPU time = 58157 ms, elapsed time = 61437 ms. If I instead introduce a temporary table then the query returns quickly and performs less logical reads: CREATE TABLE #MyTable(RGN VARCHAR(20) NOT NULL, CD VARCHAR(20) NOT NULL, PRIMARY KEY([RGN],[CD])); INSERT INTO #MyTable(RGN, CD) SELECT RGN, CD FROM TASK_REQUESTS WHERE TASK='UPDATE_MEM_BAL'; SELECT T.RGN, T.CD, T.FUND_CD, T.TRDT, SUM(T2.UNITS) AS TotalUnits FROM dbo.TRANS AS T JOIN dbo.TRANS AS T2 ON T2.RGN=T.RGN AND T2.CD=T.CD AND T2.FUND_CD=T.FUND_CD AND T2.TRDT<=T.TRDT JOIN #MyTable AS T3 ON T3.CD=T.CD AND T3.RGN=T.RGN GROUP BY T.RGN, T.CD, T.FUND_CD, T.TRDT (4447 row(s) affected) Table 'Worktable'. Scan count 5974, logical reads 382339, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'TRANSACTIONS'. Scan count 4, logical reads 4547, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table '#MyTable________________________________________________________________000000000013'. Scan count 1, logical reads 2, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. SQL Server Execution Times: CPU time = 1420 ms, elapsed time = 1515 ms. The interesting thing for me is that the TASK_REQUEST table is a small table (3 rows at present) and statistics are up to date on the table. Any idea why such different execution plans and execution times would be occuring? And ideally how to change things so that I don't need to use the temp table to get decent performance? The only real difference in the execution plans is that the temp table version introduces an index spool (eager spool) operation.

    Read the article

  • Adding LambaExpression to an instance of IQueryable

    - by Paul Knopf
    ParameterExpression parameter = Expression.Parameter(typeof(Product), "x"); MemberExpression Left = Expression.MakeMemberAccess(parameter, typeof(Product).GetProperty("Name")); ConstantExpression Right = Expression.Constant(value, typeof(String)); BinaryExpression expression = Expression.Equal(Left, Right); LambdaExpression lambada = Expression.Lambda<Func<Product, bool>>(expression, parameter); Now how do I add this lambada to an instance of an IQuerybale, lets say _query _query.Where(lambada.Compile());?

    Read the article

  • CakePHP - recursive on specific fields in model?

    - by Paul
    Hi, I'm pretty new to CakePHP but I think I'm starting to get the hang of it. I'm trying to pull related table information recursively, but I want to specify which related models to recurse on. Let me give you an example to demonstrate my goal: I have a model "Customer", which has info like Company name, website, etc. "Customer" hasMany "Addresses", which contain info for individual contacts like Contact Name, Street, City, State, Country, etc. "Customer" also belongsTo "CustomerType", which is just has descriptive category info - a name and description, like "Distributor" or "Manufacturer". When I do a find on "Customer" I want to get associated "CustomerType" and "Address" info as sub-arrays, and this works fine just by setting up the hasMany and belongsTo associations properly. But now, here's my issue: I want to get associated State/Country info. So, instead of each "Address" array row just having "state_id", I want it to have "state" = array("id" = 20, "name" = "New York",...) etc. If I set $recursive to a higher value (e.g., 2) in the Partner model, I get what I want for the State/Country info in each "Address". BUT it also recurses on "CustomerType", and that results in the "CustomerType" field of my "Partner" object having a huge array of all Customer objects that match that type, which could be thousands long. So the point is, I DON'T want to recurse on "CustomerType", only on "Address". Is there a way I can set this up? Sorry for the long-winded question, and thanks in advance!

    Read the article

  • Tracking SVN changes through multiple merges

    - by Paul D.
    At work we use a branching strategy where all changes start off in a development branch, then subsequently make their way through one or more integration branches, and finally end up in a release branch. Occasionally (more often than I'd like) I find myself needing to figure out where a particular change originated (which development branch). In this case I have to spend a considerable amount of time playing detective to trace a change backwards through 2-3 merges. Am I missing an easy way to do this?

    Read the article

  • Refactoring thick client legacy application

    - by Paul
    I am working on a fat client legacy C++ application which has a lot of business logic mixed in with the presentation side of things. I want to clean things out and refactor the code out completely, so there is a clear seperation of concerns. I am looking at MVC or some other suitable design pattern in order to achieve this. I would like to get recommendations from people who have walked this road before - Do I use MVP or MVC (or another pattern)? What is/are the best practices for undertaking something like this (i.e. useful steps/checks) ?

    Read the article

  • Embed javascript in markdown

    - by Paul Tarjan
    I'm using the Maruku markdown processor. I'd like this *blah* blah "blah" in [markdown](blah) <script src="code.jquery.com/jquery-1.4.2.min.js"></script> <script> ...do stuff... </script> but it complains when I render it with a multitude of errors. The first one being ___________________________________________________________________________ | Maruku tells you: +--------------------------------------------------------------------------- | Could you please format this better? | I see that "<script type='text/javascript'>" is left after the raw HTML. | At line 31 | raw_html |<script src='http://code.jquery.com/jquery-1.4.2.min.js' /><script type='text/javascript'>| | text --> |//<![CDATA[| and then the rest seems like the parser is going nuts. Then it renders the javascript into a div on the page. I've tried making it a CDATA block and extra spacing between the jquery and my script. Help?

    Read the article

  • How do I create and read non-global variables that aren't destroyed at end of function?

    - by Paul Reilly
    I am attempting to code some plugins to use with MIDI sequencers but have hit a stumbling block. I can't use global-scope variables to store information because multiple instances of the .dll can exist which share memory. How do I create a class (for re-usability purposes in other plugins) containing 2 dimensional array and other variables the content of which is to be shared between functions? If that is possible, how would I read and write the data from the function in the framework where I do the processing?

    Read the article

  • Console Application Structure

    - by Paul Fox
    I've written several .Net Console Applications over the past 6 months and we have many more throughout different projects in our organization. I generally stick to the same standard format/structure for my Console Applications. Unfortunately, many of our console applications do not. I have been looking into ways of standardizing the structure of these Console Applications. I would also like to provide a framework for the basic structure of a Console Application and provide easy access to standard ways of handling things such as argument passing, logging, etc. Can anyone suggest Best Practices for addressing these concerns? I have been reading this MSDN article on Console Applications in .Net which suggests a Design Pattern for Console Apps. The example uses a Template Method pattern to handle some of the concerns I listed earlier. Two negatives of using this approach are listed in the article. Ending up with twice as many classes Having many simple, similar classes Can anyone suggest better, or more standard, ways of handling this? What about listing additional negatives with this approach?

    Read the article

  • Convert Java.Util.HashMap to System.Collections.IDictionary

    - by Paul
    In Xamarin I've got a .jar I've imported using a Java Binding Library. One of the callbacks has a Java.Lang.Object parameter which gives me Java.Util.HashMap and Java.Util.ArrayList at runtime. I'm abstracting this SDK behind a cross-platform interface, so I need to convert this to a .NET type. It there anything like the ArrayAdapter except in reverse that can convert the Java types to their .NET equivalents?

    Read the article

  • IIS7 and ARR as reverse proxy for Subversion

    - by Paul Stovell
    I am using IIS7 and the Application Request Routing extension to act as a reverse proxy to Subversion running on Apache. The proxy works fine and I am able to explore the server, and even perform a "check out". However, I cannot browse to files that would normally be forbidden by ASP.NET - for example, .cs, .csproj, and so on. Files ASP.NET wouldn't be concerned with - such as .txt - are fine. I tried to edit the global web.config to remove the Forbidden handler mapping for these files, but it did not seem to make a difference. Is there any way to allow the URL rewriting module in IIS7 to work, while allowing all file extensions to be rendered?

    Read the article

  • Can I safely bind to data on multi-threaded applications?

    - by Paul
    Hi everyone, I'm trying to solve a classic problem - I have a multi-threaded application which runs some processor-intensive calculations, with a GUI interface. Every time one of the threads has completed a task, I'd like to update a status on a table taskID | status I use DataGridView and BindingList in the following way: BindingList<Task> tasks; dataGridView.DataSource = tasks public class Task : INotifyPropertyChanged { ID{get;} Status{get;set;} } Can a background thread safely update a task's status? and changes will be seen in the correct order in the GUI? Second Question: When do I need to call to PropertyChanged? I tried running with and without the call, didn't seem to bother.. Third Question: I've seen on MSDN that dataGridView uses BindingSource as a mediator between DataGridView.DataSource and BindingList Is this really necessary?

    Read the article

  • Decayed multidimensional array return from function

    - by paul simmons
    related to http://stackoverflow.com/questions/2520535/gcc-multi-dim-array-or-double-pointer-for-warning-free-compile , is there a way to return so-called "decayed array pointer" from a function? in summary (suppose 2 dim array) returning int (*a)[5] format rather than int** format? as far as I see, when returned int** pointer is sent to another function waiting (int*)[] parameter, it is not working correctly.

    Read the article

  • Viewing large XML files in eclipse?

    - by Paul Wicks
    I'm working on a project involving some large XML files (from 50MB to over 1GB) and it would be nice if I could view them in eclipse (simple text view is fine) without Java running out of heap space. I've tried tweaking the amount of memory available to the jvm in eclipse.ini but haven't had much success. Any ideas?

    Read the article

  • Transitioning from the web to the desktop

    - by Paul Anderssen
    Can anyone recommend a language, library, framework or book which focuses on GUI programming from the perspective of a web developer? I have experience in web development, for example HTML/AJAX/PHP/MySQL among similar technologies. However, I have never programmed my own back-end, or any kind of standalone program. Does anyone have experience making this transition, and what would I best study to help make the leap from the browser to creating programs with GUIs (primarily for Windows)?

    Read the article

  • Q about AbstractApplicationContext.getBeansOfType() and getBean()

    - by Paul Reiners
    We have the following legacy 2.0.7 Spring code: final Map<String, MyClass> secondaryFactories = (Map<String, MyClass>) context.getBeansOfType(MyClass.class, false, true); return (MyClass) context.getBean("myClass"); where context is an instance of org.springframework.context.support.AbstractApplicationContext Note that we ignore the return value of getBeansOfType(). This works just fine, but the problem is that the call to getBeansOfType() is time-consuming. However, even though we ignore the return value of this call, if we try to eliminate this call, then the instance of MyClass returned by getBean() is not fully initialized. (So, apparently, the call to getBeansOfType() is having some sort of side-effects that we need.) We suspect that the call to getBeansOfType() is overkill and we could do something more lightweight so that the instance of MyClass obtained by the call to getBean() would be fully initialized (but it's not null and no exception is thrown). So, is there a more efficient way of doing this?

    Read the article

  • NHibernate and reporting

    - by Paul Knopf
    I am building a website on top of nhibernate. Is there any efficient way to build reports? BY reports, I mean is there anyway to execute a complicated query that grabs random pieces of data? StoreProcedures? Hql? Can I get single, non mapped values from hql?

    Read the article

  • VirtualBox: How to connect to Internet via wi-fi on Mac?

    - by Paul Riedel
    I installed VirtualBox with a Win XP VM on my Mac running OS 10.7.5. My Mac only has a wi-fi connection to the internet. On the settings for the virtual host, I set: Attached to: Bridged Adapter Name: en1: Wi-Fi (AirPort) Adapter Type: Intel PRO/1000 MT Desktop (82540EM) Promiscuous Mode: Deny Mac Address: Cable Connected: true Those are the settings I see around the internet as being correct, but I still can't ping anything. On my Mac I have internet sharing via Ethernet enabled (not sure if that matters). When I start up my WinXP VM, it asks me to install a bunch of hardware which I don't have any drivers to. Do I need to install any ethernet card drivers in order for the internet to work? Thank you!!

    Read the article

  • MyLocationOverlay dissappears, is not there onResume.

    - by Paul
    I have a mapView to which I add a MyLocationOverlay. It displays fine when the app starts from scratch (goes through onCreate). If I exit the app (back button) and then start it again (onResume), the overlay is gone. I have tried to fix this for 10+ hours. All sorts of messing with re-adding the overlay. Resetting the overlays. Changing the maps location so it's forced to redraw. Trying to manually invalidate or force a redraw of the overlay. NOTHING has worked. From the way the code looks, the Overlay object exists and everything is working fine - but it's just not on the map. Is anybody else having this problem? (Droid Incredible, 2.2)

    Read the article

  • Scrolling Panel Printing Issue

    - by Paul
    Hi I have a site where we have the content in scrolling panels to make it neater and line up. The issue comes when trying to print the contents of my panel hidden by the scroll. Here is my panel <asp:Panel Height="400px" ID="pnlContent" class="ContentPanel ScrollBars="Vertical" runat="server" > <!-- Content bla bla bla --> </asp:Panel> Here is my media="print" style sheet code for the ContentPanel .ContentScroller { overflow:visible; } The overflow:visible does not seem to remover the ScrollBars="Vertical" Any ideas on how to get this hidden content to print?

    Read the article

  • Using pipes inside a class in C++

    - by Paul
    I'm trying to use this tutorial to make plots with Gnuplot in C++. However I will be using the pipe to Gnuplot from within a class, but then I run into some problems: I've got a header file where I declare all variables etc. I need to declare the pipe-variable here too, but how do I do that? I've tried doing it straight away, but it doesn't work: Logger.h: class Logger { FILE pipe; } Logger.cpp: Logger::Logger() { //Constructor *pipe = popen("gnuplot -persist","w"); } Gives the error Logger.cpp:28: error: no match for ‘operator=’ in ‘*((Logger*)this)->Logger::pipe = popen(((const char*)"gnuplot -persist"), ((const char*)"w"))’ Suggestions?

    Read the article

  • Generic Singleton Fasade design pattern

    - by Paul
    Hi I try write singleton fasede pattern with generics. I have one problem, how can I call method from generic variable. Something like this: T1 t1 = new T1(); //call method from t1 t1.Method(); In method SingletonFasadeMethod I have compile error: Error 1 'T1' does not contain a definition for 'Method' and no extension method 'Method' accepting a first argument of type 'T1' could be found (are you missing a using directive or an assembly reference?) Any advace? Thank, I am beginner in C#. All code is here: namespace GenericSingletonFasade { public interface IMyInterface { string Method(); } internal class ClassA : IMyInterface { public string Method() { return " Calling MethodA "; } } internal class ClassB : IMyInterface { public string Method() { return " Calling MethodB "; } } internal class ClassC : IMyInterface { public string Method() { return "Calling MethodC"; } } internal class ClassD : IMyInterface { public string Method() { return "Calling MethodD"; } } public class SingletonFasade<T1,T2,T3> where T1 : class,new() where T2 : class,new() where T3 : class,new() { private static T1 t1; private static T2 t2; private static T3 t3; private SingletonFasade() { t1 = new T1(); t2 = new T2(); t3 = new T3(); } class SingletonCreator { static SingletonCreator() { } internal static readonly SingletonFasade<T1,T2,T3> uniqueInstace = new SingletonFasade<T1,T2,T3>(); } public static SingletonFasade<T1,T2,T3> UniqueInstace { get { return SingletonCreator.uniqueInstace; } } public string SingletonFasadeMethod() { //Problem is here return t1.Method() + t2.Method() + t3.Method(); } } }

    Read the article

  • Need a TV/Movie API with associated trailers

    - by Paul
    Looking for a movie/TV API that offers previews (trailers), via widgets or links, as well. I know IMDB has an API, but it only has metadata. Internet Video Archive also has an API, but, well, lets just say they seem a bit incompetent. I could use YouTube, but I'd get a lot of cruft and unofficial results. Anyone else have any ideas?

    Read the article

< Previous Page | 52 53 54 55 56 57 58 59 60 61 62 63  | Next Page >