IT Answers » Indexeshttp://itknowledgeexchange.techtarget.com/itanswers
Tue, 31 Mar 2015 20:42:57 +0000en-UShourly1Indexes and abstracts in SQL Serverhttp://itknowledgeexchange.techtarget.com/itanswers/indexes-and-abstracts-in-sql-server/
http://itknowledgeexchange.techtarget.com/itanswers/indexes-and-abstracts-in-sql-server/#commentsMon, 29 Dec 2008 19:45:34 +0000In regards to a SQL Server, what is an index? Also, what is an abstract, and could you please explain the types of both of these items?
]]>http://itknowledgeexchange.techtarget.com/itanswers/indexes-and-abstracts-in-sql-server/feed/0Database Issues – Trying to prove that something has to be donehttp://itknowledgeexchange.techtarget.com/itanswers/database-issues-trying-to-prove-that-something-has-to-be-done/
http://itknowledgeexchange.techtarget.com/itanswers/database-issues-trying-to-prove-that-something-has-to-be-done/#commentsTue, 26 May 2009 14:16:16 +0000Hello Everyone,

I’m currently trying to prove a concept on why we should re-create our old existing PFs into SQL defined tables (Portability, performance, etc.).

After taking a look at some files, I noticed an even larger problem that would ruin my chance of proving this concept. Unless some major changes happen, we won’t see any benefits from the change.

Here’s my situation:88 Million records with over 150 Logical Files over one Physical File.

Am I crazy? Or, is that just ridiculous?

Apparently, this isn’t the only file. I’ve found at least 5 to 6 more with the same problem. I looked at some of our smaller files and they have an average of 20 – 30 logical files over that data.

They also don’t seem to think this isn’t a major problem and we shouldn’t spend a lot of time on it.

So, what I’m asking for is opinions and ideas on how to prove to that spending the time (And it will be a LOT of time) to analyze our database and get rid of all these problems.

Here’s my idea for an approach to each file:

Analyze all of the logical files and remove any not currently used

Check all programs using the logical files and remove if no longer used

Identify programs that should be re-written to eliminate logical files

Re-write said programs

Create history files to reduce the number of records

Convert PFs and LFs to Tables and indexes

Just taking a quick look at the Indexes(LFs) using iSeries Nav, I found a lot of information. One thing I noticed in the “Last Build” column was they were last built in 2002. I’m guessing even if I just rebuild those logical files we would see a performance boost. But, what is considered rebuilding? Re-compiling?

I apologize for the lengthy post. I have a lot more questions. But, I just wanted to get a feel for some Ideas.

Thank you,
Dave

]]>http://itknowledgeexchange.techtarget.com/itanswers/database-issues-trying-to-prove-that-something-has-to-be-done/feed/15DB2 indexes and Crystal Reportshttp://itknowledgeexchange.techtarget.com/itanswers/db2-indexes-and-crystal-reports/
http://itknowledgeexchange.techtarget.com/itanswers/db2-indexes-and-crystal-reports/#commentsTue, 22 Apr 2008 10:31:20 +0000Is it possible to access DB2 (V5R1) indexes from the Visual Linking Expert screen in Crystal Reports(8) and if so how?
]]>http://itknowledgeexchange.techtarget.com/itanswers/db2-indexes-and-crystal-reports/feed/0Error copying indexes in DTS packagehttp://itknowledgeexchange.techtarget.com/itanswers/error-copying-indexes-in-dts-package/
http://itknowledgeexchange.techtarget.com/itanswers/error-copying-indexes-in-dts-package/#commentsThu, 10 Sep 2009 14:18:25 +0000I have a DTS package in SQL Server 2000 that copies data from one database to another. The copy indexes option is checked. For almost a year this has worked fine until recently where the job is ending successfully but the indexes are not copying over. At first it was maybe once or twice a month it would happen and now it is almost every other day it happens. Please help!
]]>http://itknowledgeexchange.techtarget.com/itanswers/error-copying-indexes-in-dts-package/feed/0designing indexeshttp://itknowledgeexchange.techtarget.com/itanswers/designing-indexes/
http://itknowledgeexchange.techtarget.com/itanswers/designing-indexes/#commentsTue, 14 Oct 2008 15:31:49 +0000I have a question regarding database design.
Lets assume that there is a table with 10 columns. I don’t have any single column which I can choose as candidate for Primary key. Though, combination of 5 columns can uniquely identify records.
Here, I created an identity column as a PK and added UNIQUE constraint on those 5 columns. I was thinking about creating non clustered index on these 5 columns.

These 5 columns are common to many tables and are ,hence, used while in JOIN & WHERE clause.
So, from performance perspective, it makes sense to have clustered index on columns which are widely used in Join clause. Joining on columns of clustered index is faster than that of non clustered index.

So, I am not being able to understand which option is better…
clustered index on PK column
OR
Clustered Index on 5 columns.

I feel if I create a clustered Index on PK coulmn then I should also create a lookup table which contains
PK column values each corresponding to comnbination of values from those 5 columns.
In this way, pk column can also be used in joining. In such case, I will need lots of lookup table containing values for Identity key column(PK values) corresponding to combination of those 5 or more columns.
One more thing: Identity column is like surrogate column. It doesn’t contains data which makes sense to any user instantly.

I am trying to analyze existing indexes on few tables. I think I can do this by using system views like
sys.db_dm_index_usagestats, physicalstats and operationalstats.
I am here trying to figure out disk space used by each index, I/O stats ,fragmentation etc

I am wondering if ,Apart these views, there are some other effective measures for the same?
For accessing these views, one needs to have VIEW DATABASE STATE permission. As of now, I don’t have it.

However,If this is the only way to access information then,

Thanks

]]>http://itknowledgeexchange.techtarget.com/itanswers/analyzing-existing-indexes/feed/1Backing up and restoring a LIVE database in SQL Server 2000http://itknowledgeexchange.techtarget.com/itanswers/backing-up-and-restoring-a-live-database-in-sql-server-2000/
http://itknowledgeexchange.techtarget.com/itanswers/backing-up-and-restoring-a-live-database-in-sql-server-2000/#commentsWed, 02 Jul 2008 15:52:29 +0000I am using SQL Server 2000, and I backup and restore my LIVE database to a new backup server every night. Do you have any ideas as to why my restored database runs slow when compared to the LIVE database? Do I need to rebuilding indexes? Is there any way of backing up indexes as part of the main backup?
]]>http://itknowledgeexchange.techtarget.com/itanswers/backing-up-and-restoring-a-live-database-in-sql-server-2000/feed/2Is the data in a SQL Server 2000 table still available for external applications, during editing or adding indexes via the Enterprise Manager?http://itknowledgeexchange.techtarget.com/itanswers/is-the-data-in-a-sql-server-2000-table-still-available-for-external-applications-during-editing-or-adding-indexes-via-the-enterprise-manager/
http://itknowledgeexchange.techtarget.com/itanswers/is-the-data-in-a-sql-server-2000-table-still-available-for-external-applications-during-editing-or-adding-indexes-via-the-enterprise-manager/#commentsWed, 14 May 2008 03:24:18 +0000Is the data in a SQL Server 2000 table still available for external applications, during editing or adding indexes via the Enterprise Manager?
]]>http://itknowledgeexchange.techtarget.com/itanswers/is-the-data-in-a-sql-server-2000-table-still-available-for-external-applications-during-editing-or-adding-indexes-via-the-enterprise-manager/feed/0execution plan is same even though it takes 10 times longer to runhttp://itknowledgeexchange.techtarget.com/itanswers/execution-plan-is-same-even-though-it-takes-10-times-longer-to-run/
http://itknowledgeexchange.techtarget.com/itanswers/execution-plan-is-same-even-though-it-takes-10-times-longer-to-run/#commentsMon, 03 Mar 2008 05:07:40 +0000I have a query that accesses a table with a non-clustered index. When I drop the index and run the query, it takes 1.25 minutes to run. With the index, it takes 2 seconds to run. Yet, the execution plan is the same with or without the index. How can that be?

Thank you!

]]>http://itknowledgeexchange.techtarget.com/itanswers/execution-plan-is-same-even-though-it-takes-10-times-longer-to-run/feed/3Why is the query using the index even though the perecentage of unique values is 52%?http://itknowledgeexchange.techtarget.com/itanswers/why-is-the-query-using-the-index-even-though-the-perecentage-of-unique-values-is-52/
http://itknowledgeexchange.techtarget.com/itanswers/why-is-the-query-using-the-index-even-though-the-perecentage-of-unique-values-is-52/#commentsMon, 03 Mar 2008 05:09:02 +0000I have a table with no primary key and a non-clustered composite index of two columns. When I look at the number of distinct values (selectivity ratio), the table has a ratio of 52% unique values. I thought an index should be at least 90% unique in order for it to be used. Yet when I run the query with the index, it only takes 2 seconds to run. When I drop the index, it takes 1.25 minutes to run. Why is it using the index when the index is only 52% unique?

One of the examples always given is to never have an index on a column that is a flag because it only has 50% distinct values (YES, NO). So, what am I misunderstanding here.