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 dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by jepatte

  1. jepatte

    Adding a new column

    I know, its just nice to be able to see the columns when I'm looking at them in a design view. I'll use Alter table from now on.
  2. jepatte

    Adding a new column

    I have a table with 2.5 million records and I want to add a new column to it in a certain place. I would normally do this in design view in Enterprise Manager, but with my table of this many records, it takes literally 30 minutes to save a 1 byte column. When I do this with "ALTER TABLE"...
  3. jepatte

    necessary index

    What is the rule of thumb for creating an index on a Y/N column. I have a table with 15 char(1) fields with the possible value of Y or N. My table has 2.5 million records. I need the ability to filter by any of these columns either by Y or N and sometimes other criteria regarding other...
  4. jepatte

    very fast queries

    I appreciate everyone's help with this. I had a few unnecessary fields in the big table and the total bytes I had for the rows were at 1050. After I removed some of the columns, I got the bytes down to 550 and I can see a great improvement already in speed. I just assumed that as long as I...
  5. jepatte

    very fast queries

    So I can see if I had a table of 2-3 million records that I should move my voterhistory to another table. But should I really move my address, phone, email to separate tables as well? Its not good practice to have Name, Address, City, State, Zip, Phone, Email in a single table??
  6. jepatte

    very fast queries

    Nah, its just SQL 2000, not sure if Analysis Services is possible with SQL 2000.
  7. jepatte

    very fast queries

    Thanks George, that clears tings up a lot. Christian, I'm not quite sure I understand your VoteHistory response. Each person has a field currently Gen00, Gen02, Gen04, Gen06, etc. either Y or N. I'm not sure how to make 20 columns into 2 or 3? Do I need a row for every possibility, then do...
  8. jepatte

    very fast queries

    Just so I understand this, a page is what's considered the table not the recordset. ie. T1 = 10 fields SELECT F1 FROM T1 WHERE xzy = ? ....is faster than.... T1 = 50 fields SELECT F1 FROM T1 WHERE xzy = ?
  9. jepatte

    temp tables in sproc problem

    I just read an article that the same temp table can't be created in a sproc even if its in an if-else. I assume this is a limitation to at least SQL 2000 and before the sproc is compiled, there must be something in memory disallowing this.
  10. jepatte

    temp tables in sproc problem

    Sorry, yes, I had a drop at the end. I still get "#tmpPrecinctAge is already an object". I get this message when I create the sproc though.
  11. jepatte

    temp tables in sproc problem

    I need to create a temp table in a sproc but I an getting a strange error. --------------------------------------- CREATE PROCEDURE [dbo].[sp_UpdateTotalsAgePrecinct] ( @fromAge as Integer, @toAge as Integer ) AS IF @toAge > 0 SELECT NCOACounty, NCOAPrecinct INTO #tmpPrecinctAge FROM...
  12. jepatte

    very fast queries

    So even if my sql statement only selects a few fields, does the IO have to include everything? ie. Select field1, field2, field3 from <tableWith50fields> is much faster than Select field1, field2, field3 from <tableWith10fields>
  13. jepatte

    very fast queries

    Also, I'm not doing a select *, I'm just selecting 6 columns.
  14. jepatte

    very fast queries

    So best to have multiple tables all with one-to-one relationship, so that you have less columns?? Even though vote history is different for every single person, put that in a different table. So my database will have say 5 tables all with 2.5 million records?
  15. jepatte

    very fast queries

    My database is normalized. Each voter has 50+ properties. How else can you normalize on that. Age Name Race Gender VoteHistory - 20 columns which are Y/N Addresses Phone Email Districts - 10 columns...

Part and Inventory Search

Back
Top