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 IamaSherpa 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: *

  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...
  16. jepatte

    very fast queries

    I have a site that has voter information for a state. There are over 2.5 million records in the main table with 50 fields. This site allows users to choose many different filters to get counts. ie. Race, Age, Gender, Vote history, etc. No matter what my indexes are, it still takes anywhere...
  17. jepatte

    update sql and can't view record

    I sometimes do a mass update in Query Analyzer. ie. Update t1 Set f1 = 'Y' WHERE f1 = 'Yes' If this is a very large dataset and can take 3 or 4 minutes, my web application that reads this same table can't view a single record while this update is going on. It will timeout if I just want to...
  18. jepatte

    sites with download from sql

    So what you are saying is that since Race only has maybe 6 values out of 2.5 million records, indexes are pointless for this field and Gender??
  19. jepatte

    sites with download from sql

    looping thru in the app code. It could 150K records. I've defragged my indexes by the way. Here is a simple command that take a while. Table: Voters Fields Querying on: Race, Gender and Age (age is an int field that I will update nightly based on Birthdate, then rerun the index on it) SQL...
  20. jepatte

    sites with download from sql

    I have to loop thru the records, how else am I going to write them out to a csv file? All these tables are static, no updates are ever made. when I look at the execution plans, I see 5% here, 7% there, then 47% bookmark. I'm not quite sure if that's bad or not.

Part and Inventory Search

Back
Top