Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: iwease
  • Order by date
  1. iwease

    The 'using' statement vs GC memory management

    ok, thanks everyone. I will continue to update my coding practices
  2. iwease

    The 'using' statement vs GC memory management

    ok, two questions then. 1) my code in the past doesn't use using or dispose (because i relied on the GC). What is the penalty for not calling Dispose or using 'using'? Future code should use using/dispose but my old code is ok with the automatic garbage collection, right? 2) Dispose is...
  3. iwease

    The 'using' statement vs GC memory management

    Hi, I've been reading a bit about the using statement. ie using (TextWriter w = File.CreateText("log.txt")) { w.WriteLine("This is line one"); } My understanding is that this code will call the Dispose() method of w at the end of the using block. None of my previous code has ever...
  4. iwease

    Should I use a CurrentID bit field or sort by date for each select?

    yeah, I'm not a big fan of keeping the historical data and the transactional data tied together the way I suggested in the last method. Still, in my particular case, it is not such a big deal. I really appreciate both yours and mrdenny's help. It has definately made a difference on this...
  5. iwease

    Should I use a CurrentID bit field or sort by date for each select?

    This idea is essentially what you suggested ESquared, except that there is not a separate table. I know that you would prefer a separate table for security/data integrity purposes and I should look into that a bit further before finalizing this but seems to be the way to go
  6. iwease

    Should I use a CurrentID bit field or sort by date for each select?

    Hey, you guys are really helping me think out of the box here. I think I've come up with the final solution (which is kind of similar to ESquared's idea). In my original table, I have a reference to the current historical data id. So I have the following Transaction DB table TableA...
  7. iwease

    Should I use a CurrentID bit field or sort by date for each select?

    Wow...I am impressed. You knew that I missed you post (I'm assuming because I was doing mine at the same time). ok, my original plan was to have a trigger on table A that does an insert into HIS_TableA each time something is inserted or updated in table A. This trigger would handle updating...
  8. iwease

    Should I use a CurrentID bit field or sort by date for each select?

    You have been a really big help to me, getting me to run the tests and see what happens (I don't know why I sometimes don't think of these things myself:). Anyway, I need to update IsCurrent requently now to maintain the current record. With the index on IsCurrent, this is pretty slow. I...
  9. iwease

    Should I use a CurrentID bit field or sort by date for each select?

    sure Execution Plan for method 1 <ShowPlanXML xmlns="http://schemas.microsoft.com/sqlserver/2004/07/showplan" Version="1.0" Build="9.00.3042.00"> <BatchSequence> <Batch> <Statements> <StmtSimple StatementText="SELECT * FROM [test_IsCurrent] WHERE [IsCurrent]=@1"...
  10. iwease

    Should I use a CurrentID bit field or sort by date for each select?

    Ok, so I did some testing. I set up 3 tables with the same data Table 1 and Table 2 HIS_ID Uniqueidentifier (Primary Key) ID Uniqueidentifier (INDEXED) DateInserted DateTime (INDEXED) AND Table 3 HIS_ID Uniqueidentifier (Primary Key) ID...
  11. iwease

    Should I use a CurrentID bit field or sort by date for each select?

    I found another method to do this on the web using rank and partition create table #test (testid int identity(1,1), personid int, persondate int) insert into #test (personid, persondate) values (1, 1) insert into #test (personid, persondate) values (1, 2) insert into #test (personid...
  12. iwease

    Should I use a CurrentID bit field or sort by date for each select?

    hmmm...yeah, I really should learn how to read an execution plan it seems. I was hoping one of those methods would stand out and be the obvious way to do it (I'm assume the bit method would have better performance since it doesn't need to use any subqueries) but I guess it is something that I...
  13. iwease

    Should I use a CurrentID bit field or sort by date for each select?

    Good thought. However, I forgot to mention that the databases have the ID fields as GUIDs so max(HistoricalTableAID) doesn't actually give the most recent value
  14. iwease

    Should I use a CurrentID bit field or sort by date for each select?

    I have a database that is storing historical data. It actually consists of two databases. There is a transactional database that contains all the current records, and then a historical database that contains all records over all periods of time. It is set up as follows Transaction DB table...
  15. iwease

    I get to define my own career path/targets. Any ideas?

    Hi, I have been working as a contractor for an engineering company and now they want to hirer me into the software department where I will become the department head. Of course, the 'department' currently only consists of me, and one other programmer. The problem is the company I work for is...
  16. iwease

    Stumped on locking error

    I have a web app that is running from a SQL Server 2005 database. Periodically, the app generates a timeout error, but if I run the command from management studio, it takes less than a second. Furthermore, the timeout error appears to happen randomly and does not occur with only a specific...
  17. iwease

    DB must OLAP and OLTP?

    Lets see...I figured I could do something like SELECT d.* FROM Deficiencies d INNER JOIN (SELECT Max(DeficiencyID) as CurrentDefID FROM Deficiencies GROUP BY OriginalID) c ON c.CurrentDefID = d.DeficiencyID Perhaps not the most beautiful query ever but does the job. And with the view...
  18. iwease

    DB must OLAP and OLTP?

    That is a nifty little trigger. I might use that for our system but I'm still not entirely sure which method to go with. That trigger could be useful for both. I have been thinking about this the same way as you have. A co-worker explained to me that for method 1, you don't have to keep...
  19. iwease

    DB must OLAP and OLTP?

    I should mention that I am by no means an expert in using the terminology OLAP and OLTP. I have created lots of fully normalized databases for handling short term transactions (so, I assume this is OLTP) and I have also created a star schema database that was only for reporting but that is my...

Part and Inventory Search

Back
Top