indexing

What is a Covered Index?

I've just heard the term covered index in some database discussion - what does it mean? ...

How would I go about creating a custom search index much like Lucene?

I implemented a Lucene search solution awhile back, and it got me interested in compressed file indexes that are searchable. At the time I could not find any good information on how exactly you would go about creating a custom search index, so I wonder if anyone can point me in the right direction? My primary interest is in file formatti...

What is the best way to build an index to get the fastest read response?

I need to index up to 500,000 entries for fastest read. The index needs to be rebuilt periodically , on disk. I am trying to decide between a simple file like a hash on disk or a single table in an embedded database. I have no need for an RDBMS engine. ...

What datatype should be used for storing phone numbers in SQL Server 2005?

I need to store phone numbers in a table. Please suggest which datatype should I use? Wait. Please read on before you hit reply.. This field needs to be indexed heavily as Sales Reps can use this field for searching (including wild character search). As of now, we are expecting phone numbers to come in a number of formats (from an XML...

How do you know what a good index is?

When working with tables in Oracle, how do you know when you are setting up a good index versus a bad index? ...

What are the full-text search tools you can use in SQL Server?

Besides full-text indexing and using LIKE keyword, what are other tools to build search functionality on top of MS SQL? This question is particularly for searching records, not files. ...

create an index on a mysql column based on the length its contents?

How do I create an index on a column in mysql v 5.0 (myisam db engine) based upon the length of its value its a TEXT data type up to 7000 characters, do I have to add another column with the length of the first column. Any help kindly received, cheers ...

Enforce unique rows in MySQL

I have a table in MySQL that has 3 fields and I want to enforce uniqueness among two of the fields. Here is the table DDL: CREATE TABLE `CLIENT_NAMES` ( `ID` int(11) NOT NULL auto_increment, `CLIENT_NAME` varchar(500) NOT NULL, `OWNER_ID` int(11) NOT NULL, PRIMARY KEY (`ID`), ) ENGINE=InnoDB DEFAULT CHARSET=utf8; The ID field is a s...

indexer for source code?

More specific I need indexer for verilog, vhdl and c++ code on *nix platform. ...

Lightweight Search Indexing API/Lbrary

Hi, I'm looking for an open source search indexing library. It will be used for embedded web application so it should have a small code size. Preferably, written in C, C++ or PHP and does not require any database to be installed for storing indexes. Indexes should be stored on a file instead (e.g., xml, txt). I tried to look on some fam...

What are the differences between a clustered and a non-clustered index?

What are the differences between a clustered and a non-clustered index? ...

What tool do you use to index C/C++ code?

I am working with a very large code in C/C++. Indexing and referencing is a must in this environment. What tools would you recommend for viewing/browsing the code? Preferably open source. I tried CDT for indexing but it is useless. Other tools I've tried is cscope, but it does not work well with C++... ...

C101: the best way to fill an array from user input?

I'm having a hard time understanding and therefore managing arrays and indexes manually in C. These are my two classic approaches but they doesn't seem to work as they keep looping when the condition is reached: #include<stdio.h> #define MAX 255 int main(){ int arr[MAX]={0}; int idx=0; /* Approach #1 */ printf("Ente...

Indexing nulls for fast searching on DB2

It's my understanding that nulls are not indexable in DB2, so assuming we have a huge table (Sales) with a date column (sold_on) which is normally a date, but is occasionally (10% of the time) null. Furthermore, let's assume that it's a legacy application that we can't change, so those nulls are staying there and mean something (let's s...

How does including a SQL index hint affect query performance?

Say I have a table in a SQL 2005 database with 2,000,000+ records and a few indexes. What advantage is there to using index hints in my queries? Are there ever disadvantages to using index hints in queries? ...

Does an index help with < or > MySQL queries?

If I have a query like "DELETE FROM table WHERE datetime_field < '2008-01-01 00:00:00'", does having the 'datetime_field' column indexed help? i.e. is the index only useful when using equality (or inequality) testing, or is it useful when doing an ordered comparison as well? (Suggestions for better executing this query, without recreat...

How do I check if index exists on a table field in mysql

I've needed to Google this a couple times, so I'm sharing my Q/A. ...

What is the best way to obtain an index into a vector when using Iterators to loop over it.

When iterating over elements of a vector it is preferred to use iterators instead of an index (see Why use iterators instead of array indices?). std::vector<T> vec; std::vector<T>::iterator it; for ( it = vec.begin(); it != vec.end(); ++it ) { // do work } However, it can be necessary to use the index in the body of the loop. Whic...

What is an orthogonal index?

A table in my area of responsibility of our product has been criticised as having more than one orthogonal index. What is an orthogonal index? Why is it bad? How can the situation be avoided? --Update-- The back-end database engine isn't necessarily relevant here as our application is database-agnostic. But if it helps, Oracle is one p...

What are the different types of indexes, what are the benefits of each?

What are the different types of indexes, what are the benefits of each? I heard of covering and clustered indexes, are there more? Where would you use them? ...