Database Design - Performance SQL Server 2000
Jul 28, 2006
Hi
I have a database that stores all the data in one table that is only the data we are required to store hence it didnt require any other tables
the table has five colunms
Orderid, ordercost, orderdate, ordersystem, orderref
it is used in an web application that seraches for all the rest of the information using an orderid and displays the rest of the details the size of the table currently is about 123000 records that is increasing by 20000 every week.
i have an archive of the same data that has 7,666,000 records that are also going to be placed into the same database.
my question is is that a good idea of doing this?
are there any performance issues that i need to be aware of as currently the application runs quite quick?
View 15 Replies
ADVERTISEMENT
Jul 25, 2005
I have created an internal “e-mail� type system in our business application. The idea was pretty basic have a message table which would hold the data such as To, FROM, blah blah. Then there would be an Inbox table which would have the User Name and the Message.ID from the message table. By joining these two you would have the person’s inbox. Each table has an ID column which is the clustered index, The Inbox table has an additional Index on the User Name. These tables are very busy and large, here are the stats.
Messages – 860,000 rows est. Total
Inbox – 2,584,000 rows est. Total
For June there were 144,000 Messages of which 780 went to multiple recipients causing 276,000 Inbox references.
Everything works except getting a persons Inbox can get very slow. To address this we are currently Index Defragging and Re-Indexing. Now these action appear to be correcting the problem but only for a short time which is why we are doing it several times a day.
Solution?
I think the problem is that my most used Index (User Name in the Inbox) is not clustered? And I should have a larger Fill Factor than 90%?
Any advice greatly appreciated, the transaction logs are killing me.
View 4 Replies
View Related
Jul 23, 2005
Hi,Simple question: A customer has an application using Access 2000frontend and SQL Server 2000 backend. Data connection is over ODBC.There are almost 250 concurrent users and is growing. Have theysqueezed everything out of Access? Should the move to a VB.Net frontendtaken place ages ago?CheersMike
View 4 Replies
View Related
Mar 11, 2008
What are the ways to do that ?
View 2 Replies
View Related
Sep 21, 2007
Hello,
We previously having two servers A and B. Server A is used for updation of data and the data then replicated to server B. Server B is used for
Server A :
purpose : used for database updation/ modification
SQL Server version : SQL Server 2000 SP 2
Server Z :
purpose : used for Reporting
SQL Server version : SQL Server 2000 SP 2
We were doing Transactional replication from Server A to Server B.
Last month we have broght another server (Server B) with same hardware configuration but having SQL SERVER 2005 installed. This is to speed up our database update process. We have moved some of the database on this new server so that we can achieve our deadlines.
Server B :
purpose : used for database updation/ modification
SQL Server version : SQL Server 2005
I have set up the transactional replication from Server B to Server Z and replication works fine.
However, the issue is after it is started replicating from this new server (Server B) performance of all the queries reduced a lot.(making my life harder)
I didnt expected this as our reporting server is still SQL server 2000.
I have restored the backup of database which was replicated from server A (sql server 2000) and compared execution plan for one of our common query (which is used in most of the reports and which is now taking longer time to provide results)
I found that database which is replicated from Server B (Sql server 2005) is having primary keys. which was not present in the database which replicated from server A(Sql server 2000).
I have then removed the primary key and make the indexes same as previous copy of database(which was replicated from server A) But still the query takes long time.
Execution plan now shows "Table Spool" which was not present in previous copy of database.
Almost every query for this database is taking longer time now.
Can someone suggest me what is wrong and what should I need to fix.
Am I going on the right direction?
View 14 Replies
View Related
Jul 20, 2005
Hello gurus:Hopefully someone can shed some light on some questions I have. I amtasked to build an application that will schedule and track tasks. Ifirmly believe in not reinventing the wheel however also feel thatcustomizing is certainly not out of the question.I am looking to build something in ASP (or .NET) that can allow anindividual to work "disconnected" from the network while stillaccessing a database (MSDE?) that will sync with SQL 2000 oncere-connected. I have built multiple db apps that are strictly webbased and consider myself somewhat knowledgeable (read.. dangereous)SQL/ASP dude. I understand that for a stand-alone client app I mayhave to use .NET and load the framewsork on the client in order to runthe dynamic pages for database updates. Here are my questions:1) Is there a way for SQL server to "replicate" its tables into aschema/data recognized by MSDE (i.e. generate the "mother ship" tablesand schema first, then use SQL Server to automatically create (export)the client MSDE tables)2) are there tools to manage MSDE so one can see what the heck is inthere? I understand Enterprise manager will not work in this regard.3) Are there any resources (documents, tutorials etc..) for datareplication (i.e. dbsync from MSDE up to MSSQL and vice-versa)4) Am I wasting my time doing this from scratch because there isalready something out there that does all this that is moderatelypriced and customizable?Thanks for your attention and consideration.Eric B
View 1 Replies
View Related
Jul 20, 2005
I'm trying to do a simple alteration to the table design of one of ourSQL 2k tables, simply changing an identity row so that its not 'notfor replication', and its taking absolutely ages to do so, and stopsthe sql server from working.Whilst it's attempting the update, no one can access the database, thesqlservr.exe memory usage shoots up and enterprise manager reports anot responding status. Eventually after about 10 minutes, it bombs outreporting,Unable to modify tableCould not allocate space for object 'Tmp_TableName' in database'DBNAME' because the 'PRIMARY' filegroup is full.The table i'm attempting to change has only about 4000 records sothere's not a huge amount of data.Any ideas what's causing this and how i can get around it?A similar thing happens when i attempt to change the length of avarchar too.Thanks in advance for any suggestionsDan Williams.
View 3 Replies
View Related
Mar 17, 2008
Hi,
I am studying for the above exam and have got a new laptop with the basic version of Vista pre-installed on it. I've got an evaluation version of SQL Server 2000 I got from a Microsoft event but the basic version of Vista I have, will not let me install it.
Can anyone advise me whether SQL Server Express will be useful in studying for the SQL Server 2000 Design 70-229 Exam?
If not, I see my options as fork out for an older OS licence - XP pro to put on the laptop which would allow me to install the evaluation edition. Not my first choice but it would do...
Thank you,
Mark Smith
View 5 Replies
View Related
Jun 14, 2007
Good day,
Very recently my sql server started performing very poorly. Nothing has been installed or loaded on it to cause the poor response. What ever I do, from running a query to opening windows explorer response well, all very slow and very often query time out, ones that took a few second to run before.
The CPU usage and memory usage do not indicate anything specific. Is there some way I can pin point specifically what database or query or job is causing the problem.
Please can someone help me, this is VERY urgent, our production is suffering huge, and a reload is not an option as I can't get a backup of the databases as they also time out.
PLEASE HELP!!
View 1 Replies
View Related
Jul 23, 2005
Will the next release of SQL Server 2000 64bit sp provide performancecounter?MarcM
View 2 Replies
View Related
Apr 26, 2006
The execution time for this query on DB2 v8.0 DBMS one second but I execute it on SQL SERVER 2000 is around 55 second
so how i can incease the performance for SQL server
SELECT ACC_KEY1,ACC_STATUS_LAST FROM PSSIG.CLNT_ACCOUNTS INNER JOIN PSSIG.CLNT_CUSTOMERS ON
PSSIG.CLNT_ACCOUNTS.CSTMR_OID = PSSIG.CLNT_CUSTOMERS.CSTMR_OID
WHERE (PSSIG.CLNT_CUSTOMERS.CSTMR_START_DT >= '1900-1-1 12:00:00') AND
(PSSIG.CLNT_CUSTOMERS.CSTMR_END_DT <= '2106-12-31 12:00:00') AND
(PSSIG.CLNT_ACCOUNTS.ACC_KEY1 >= '0000000000000') AND
(PSSIG.CLNT_ACCOUNTS.ACC_KEY1 <= '9999999999999') AND
(PSSIG.CLNT_ACCOUNTS.ACC_STATUS_LAST = 5 ) AND
ACC_KEY1 > '0' ORDER BY ACC_KEY1
Note 1: value 5 exist in most of rows about ( 999999/1000000 ) from the table rows count
Note 2: the number of rows in each table around 15000000
Note 3: I used the same index structure for both DB2 and SQL server 2000
Note 4: I used some other feature in DB2 that increase the performance but I did not
found the alternative for it in SQL server 2000 :
a- cardinality varies at run time feature
b- include column in index instead of use compound index for
( ACC_KEY1 ,ACC_STATUS_LAST ) columns
Note 5 : Enable reverse scan for index
View 3 Replies
View Related
Jan 14, 2006
I develop my database with SQL Server 2005 Express.I have a member profile, stored in tblMember.In this profile I have a field "Religion" and a field "Country".I COULD store the value of these fields just in those fields, eg Christian in the Religion field and "Sweden" in the Country field.ORI could make a seperate table for each, eg for tblReligion:ReligionID (PK)ReligionName (string)and then in the tblMember make a FK to the PK of this table.but I have many of these kind of fields (where a FK might be needed) in my tblMember.So if I want to search in my members, I will first have to obtain the PK of the other tables.My questions:is this good DB design?Will I get performance problems when I do it like this?Are there better solutions?Thanks ahead!!
View 3 Replies
View Related
Apr 11, 2006
I want to write a application monitering program to collect the SQLServer 2000 performance data,such as pages/sec, bytes total/sec, etc, BUT I don't know how to do it, In Oracle , there are the v$ views and DBA view , which I can findthe information I interested, the question is , is there a similar suitof view in SQL Server 2000 to provide the performance information ?Thank you very much, I will be mad by this question, for I have googledall the day , but in vain
View 1 Replies
View Related
Nov 15, 2007
Hi!!
In our SQL server is installed in Windows 2003 Standard edition. there about 30 clients using SQL server....
* How to improve SQL server performance ??
* How to improve Network traffic problem ??
* Should I use 2 Network Adapter Card???
Any idea please...
thanks...
View 4 Replies
View Related
Jul 23, 2005
What is the overhead of using extended stored procedures?I created a table with 500,000 rows.1) I ran a select on two columns and it runs in about 5 seconds.2) I ran a select on one column and called an UDF (it returns aconstant string) and it takes 10 seconds.3) I ran a select on one column and called a UDF that calls an extendedstored procedure that returns a string and it takes 65 seconds.I also tried running test 3 with 4 concurrent clients and each clienttakes about 120 seconds.
View 1 Replies
View Related
Aug 1, 2007
Hi,
I'm having an issue with a query I'm running on Sql Server 2005. It's a semi-complex query involving an in-line table function and several left outer joins which are joined on to the results of the function call. Two of the left outer joins are then qualified in a where clause of the form where table.Col is not null; the idea is that the final result set contains data that has no match in those two tables.
The problem revolves around a where clause in the function and the last left outer join (ie, one of the ones qualified with where not null). When I alter the where clause of the function to further restrict the result set the function returns, the query times shoots up from 1 second to roughly 2-3 minutes. Note that the time the function takes to complete is not affected. The difference in time is purely down to what the query does with the results the function provides. Also note that the change to the where clause provides a subset of the original data; it does not add any more data (it actually restricts the original resultset by roughly 1000 rows).
I can bring the query speed back down again by removing the last left outer join - this join takes one of the columns from the function, and joins it to a small table - 924 rows. So it appears that this particular join is the cause of the issue, but only when using the resultset generated from the modified function query.
Now, as the thread title alludes, Sql Server 2000 and 2005 handle this differently, or appear to. When I execute this same query on a Sql 2000 machine, there's no apparent time differences, and the data that is returned is as expected. Does anyone have any suggestions as to what might be causing this and how I can fix it? I could simply return the larger resultset and use managed code to filter out the rows I don't want; however, I would like to get to the bottom of this, especially if it's going to effect future queries.
Cheers,
Chris
View 4 Replies
View Related
Aug 10, 2005
Hi,Can anyone put a name to the following type of design...I need to be able to modify the amount/names of data "fields" storedfor an entity so instead of representing the data stored for an entityin fields associated with that entity you would relate it to an anotherentity which would contain a datafield type field and its associatedvalue, so different rows in the parent table could possibly havedifferent datafields associated with it.E.gThe parent table is "person" and it holds common data amongst allpeople - it has primary key of personID.There is another table assoicated with person called "personDetails".This would have fields "personID", "dataType" and "dataValue". Itmight have records like the following:personID, dataType, dataValue1,phone,1234561,email,t...@test.com1,state,NSW2,phone,9874563212,state,VIC3,phone,789456123Of course this is just an example - the parent entity could beanything.I've seen a few XML files implement this type of design. e.g<job><jobNumber>XYZ12345</jobNumber*><jobCreated>12-03-2005</jobCre*ated><jobdeatils><jobdetail type="WEIGHT">167</jobdetail><jobdetail type="WEIGHTMEASURE">KGS</jobd*etail><jobdetail type="CUBIC">45</jobdetail><jobdetail type="CUBICMEASURE">M3</jobdet*ail><jobdetail type="NUMPIECES">345</jobdetai*l></jobdetails></job>Hope someone can put a name to this sort of design. I want to researchinto this to see how people search effectively in this design and itsperformance compared to traditional methods etc etc.I would be implementing this design in MS SQL and it would be accessedby an 400-500 users via ASP.NET.Any help would be appreciated. Thanks Adam.
View 2 Replies
View Related
Nov 21, 2006
Cannot see the Colums in the "design view" of Queries. All i see when i want to design a new query is *columns
This happens in only one database, in other databases using same server i can see the colums and can tick them to view then in the query.
In enterprise manager i see all the columns.
Using SQL 2000 and MSAccess 2000
View 1 Replies
View Related
Apr 22, 2008
I have an opportunity to rebuild a database model with the express purpose of improving query performance. So given the following I have a few questions.
Table A (~500M records)
Primary Key Field (int)
Field 1 (varchar)
Field 2 (varchar)
Field 3 (varchar)
Field 4 (varchar)
Field 5 (varchar)
Table B (1B+ records)
Primary Key Field (int)
Foreign Key Field (int)
Field 1 (varchar)
Field 2 (varchar)
Field 3 (varchar)
Field 4 (varchar)
Field 5 (varchar)
* Assumed: Tables are inner joined on all queries. The database is readonly.
-- Most of my lookups are based on querying Field 1 of Table A. The data content of Field 1, Table A is 90% unique.
1) Would it be more beneficial to put the clustered index on Field 1 instead of the PK field in Table A?
2) Can an Identity column be non-clustered?
3) Alternatively, would it be beneficial to build a separate lookup table with just the PK & Field 1 of Table A, with a clustered index on the lookup table Field 1 which I join on Table A? (did that make sense?)
-- I have a secondary lookup that performs queries on Fields 1, 2, 3, 4 & 5 of Table B
1) Would it be more beneficial to create an additional indexed lookup column of the concantenated values of Fields 1-5 of Table B versus a covering index of all 5 columns?
2) Does a clustered index have to be unique?
3) Would a clustered index be more beneficial over Fields 1-5 or the special lookup column versus the PK or FK fields?
4) Would creating a special lookup table with just the requisite fields be more beneficial?
An extra question. The existing data model uses the CHAR datatype for all columns less than 9 characters wide and the columns are set to allow nulls. This requires every select statement to COALESCE() and RTRIM() all these columns. I intend to make all (affected) columns VARCHAR, NOT NULL with a default value of a 0-length string.
Will this enhance query performance?
Thanks in advance for any insight.
View 7 Replies
View Related
May 13, 2015
I have a scenario like below
Product1
Product2 Product3
Product4 Product5
Product1 1
1 0 0
1
Product2 1
1 0 0
1
Product3 0
0 1 1
0
Product4 0
0 1 1
0
Product5 1
1 0 0
1
How to design tables in SQL Server for the above.
View 2 Replies
View Related
Jul 20, 2005
I changed from Access97 to AccessXP and I have immense performanceproblems.Details:- Access XP MDB with Jet 4.0 ( no ADP-Project )- Linked Tables to SQL-Server 2000 over ODBCI used the SQL Profile to watch the T-SQL-Command which Access ( whocreates the commands?) creates and noticed:1) some Jet-SQL commands with JOINS and Where-Statements aretranslated very well, using sp_prepexe and sp_execute, including thesimilar SQL-Statement as in JET.2) other Jet-SQL commands with JOINS and Where-Statements aretranslated very bad, because the Join wasn´t sent as a join, Accesscollects the data of the individual tables seperately.Access sends much to much data over the network, it is a disaster!3) in Access97 the same command was interpreted wellCould it be possible the Access uses a wrong protocol-stack, perhapsJet to OLEDB, OLEDB to ODBC, ODBC to SQL-Server orJet to ODBC, ODBC to OLEDB and OLEDB to SQL-Server instead ofJet to ODBC and ODBC direct to SQL-ServerDoes anyone knows anything about:- Command-Interpreter of JetODBC, Parameters, how to influence thecommand-interpreter- Protocol-Stack of a Jet4.0 / ODBC / SQL-Server applicationThanks , Andreas
View 6 Replies
View Related
Jan 11, 2007
HiI am facing a problem in designing a database for my project.Please help
I have hotel Information.The hotel allocates rooms for my company.This is done on weekly basis.
Now suppose in first week of a year the number of rooms allocated to the company is 3,2ndweek =5,3rdWeek=5 and so on...
So when i search based on a week i should have one result setIf i search based on MOnth i should have one result set.. in this way.
So what fields i need to take in a database table so that when i search based on week /month/quarter/year i get different resultsets.
View 6 Replies
View Related
Oct 6, 2015
Is it possible to create a database which design or data is not needed to update and i want to set to it as a READ ONLY. what are the steps to create such type of database?
View 3 Replies
View Related
Sep 28, 2007
Hi guys,
I have a performance related question about the DTS package in sqlserver 2000 which i have developed
We have developed a DTS package which will migrate a view 'ATTRITION' from Sqlserver 2000 to an Oracle database.The design of the package is as follows
First step: It checks for the existance of the table 'ATTRITION' in oracle database, if table 'ATTRITION' is not there it will create a table called 'ATTRITION' in the oracle db.If the table 'ATTRITION' is already present in the oracle db,then the table is truncated.
Second step: The view 'ATTRITION' is migrated to Oracle table 'ATTRITION'.
For the migration, i have used a connection object which connects to sqlserver 2000 and for oracle connection i have used another connection object 'Microsoft ODBC driver for oracle' and i have joined both the connection objects with 'Transform data task' task which maps one to one from sqlserver 2000 where view 'ATTRITION' exists with oracle database where Table 'ATTRITION' exists.
Roughly i have around 65000 rows in 'ATTRITION' view of sqlserver 2000 which needs to be migrated.When im running the package on my system it takes around 4 minutes to migrate all the rows but when im running it on the server it takes a lot lot of time more than 1 hour.
The view definition im using has more than 10 tables joined together.But if its a problem of query used in the view,and if i run the view seperately it quickly displays the data hardly takes 1 minute. and even if i run the package on my local pc it doenst take much time.Now my confusion is why its taking soo much time on server.If i create a indexed view then will it solve my problem.Please suggest...
Thanks in advance
REgards
Arvind L
View 5 Replies
View Related
Nov 2, 2015
In our application we are copying data between 2 sqlserver databases using linked server. Say, sqlserver1 is source and sqlserver2 is destination, then, our application will be on sqlserver2 box and will copy data from sqlserver1 to sqlserver2.
User also need to choose from which database of sqlserver1, the data need to be copied. This data is our application data.. Nothing related to sqlserver database.
We are using the following query, to get the database names of the source sqlserver..
SELECT * FROM <linked server to dest db>.master.sys.databases
My questions is : is this query generic enough that works on all sqlserver versions?
Is the master database name of sqlserver configurable or its alwasys fixed as "master"?
View 4 Replies
View Related
Feb 13, 2002
Ok, I'm doing a football database for fixtures and stuff. The problem I am having is that in a fixture, there is both a home, and an away team. The tables as a result are something like this:
-------
Fixture
-------
fix_id
fix_date
fix_played
----
Team
----
tem_id
tem_name
-----------
TeamFixture
-----------
fix_id
tem_id
homeorawayteam
goals
It's not exactly like that, but you get the point. The question is, can I do a fixture query which results in one record per fixture, showing both teams details. The first in a hometeam field and the second in an away team field.
Fixture contains the details about the fixture like date and fixture id and has it been played
Team contains team info like team id, name, associated graphic
TeamFixture is the table which links the fixture to it's home and away team.
TeamFixture exists to prevent a many to many type relationship.
Make sense? Sorry if this turns out to be really easy, just can't get my head around it at the mo!
View 2 Replies
View Related
Aug 4, 2015
I don't want to any body can backup of my database, even i can also not able to take backup.
View 17 Replies
View Related
Sep 21, 2006
Hi there.I'm on a SQL 2000 SP4 machine.This is a development machine, with only a couple of small databases onit.Yesterday I needed to recover a table from backup, so I went throughthe following process:-Used 'Create SQL script' to generate a create db statement from thecurrent db.-Changed the db name, and all file paths to not conflict with thecurrent db.-Created a new db in a new directory with this script.-Restored last night's backup from the 'real' db to the new one.-Went into the 'recovered' database, located the table which needed tobe restored, and renamed it to "<table_name>_RECOVER"-Used DTS to transfer that table to the 'real' database-Truncated the table to be recovered-did a 'Insert into select * from' statement to recover the records.-dropped the table that I had copied in via DTS. This table was small -8000 rows or so.The database seemed fine at the time.Now (the next morning) I am finding that performance of the 'real'database is agonizingly slow. Even doing a 'select count (*) from <asmall tablesimply does not return a result. the 'processing' globeicon spins merrily away, and I get no result set.However, the same query, submitted against the 'recovered' database(the one I restored in order to get the data I required) respondsinstantly, as it should.These databases are both hanging off the same named instance of thisserver (there are three instances).A quick Perfmon check shows the CPU to be nearly idle.I'm not sure what to look at here - can anyone suggest a direction?Thanks!
View 3 Replies
View Related
Mar 15, 2006
Hi there.
I´m running some tests in a database with Mirroring and without Mirroring. As expected there is a performance hit using Database mirroring.
The tests i´m running are just simple functions inserting and updating the database, and then counting the number of sucedeed inserts and updates in a time interval.
My question here is: What if i use Sql Server failover mechanism?
I know that failover time will increase and management is more complex, but what can i expect in terms of performance ?
View 8 Replies
View Related
Dec 18, 2007
Dear all,
Right now I built an SSIS package to transform data from external source into local database server. I schedule it to be processed at that database server (ex Server A). Is there any difference performance if I replaced the SSIS package to be processed at another server (ex Server B) ? I'd like to separate the process because I want to reduce workload in Server A by removing the SSIS process to Server B. Am I correct ?
Thanks in advance,
Hery
View 2 Replies
View Related
Oct 30, 2007
Problem description
There are two sql servers with the same database in different locations with replication running on them. Users in the two locations insert or update date on there own database through an ms access application . The data are replicated to both servers.
Someone wanted a copy of the database and they dropped replication, but users continue to modify and add data on both servers and so replication could not be back again without merging the two databases as one again and restarting replication.
My job was to merge the databases and make replication work and after allot of work all is fine.
I copy and attached the database on my pc that I set up as a server and did the job. Then I went back on both servers that had replication running before I attached the database and set the subscriber and publisher and all was fine to that point.
The database has six groups with permissions on them and many database users on each location. Both the groups and the users show on the database.
I create a new login and user and I add him to the groups to get the permissions.
Now back on a user pc I login with the new user name run the ms access application and try to add some new records, but I get errors that I cannot insert null values to two of the fields in several tables in the database.
This was not happening before and the database was recording the values in those fields namely the user name and the date that the new record was created.
After some reading I found out that I might need to set the groups and permissions on the views and tables from the beging but Im not an expert.
Any ideas?
Thanks allot
George
View 1 Replies
View Related
Dec 12, 2006
I am trying to move a database which I wrote in SQL Server 2005 to a SQL Server 2000 database.
I'm not sure the best way to do this.......
Can anyone enlighten me?.....
View 4 Replies
View Related
Jan 25, 2007
I am working on a project that was written in Visual Studio 2003 using asp.net and C#. The project accesses a SQL Server 2000 database. I need to test the application. What I want to do is to copy the database over to a test server. The problem is that the test server only has SQL Server 2005 on it. Would it be a problem if I backed up the database using SQL Server 2000 and then recreated it on the server as a SQL server 2005 project? Would my source code accept the new database even though it would now be in sql server 2005?
View 2 Replies
View Related