indexing

Is it possible for lucene to store the index only in one file

When we create a lucene index, various files are created. If we do not optimize Index writer three files are created, one named _0.cfs which contains all of the index data and two other files containing meta data. Is it possible to force lucene to create only one file instead of three. ...

Is it bad to have a non-clustered index that contains the primary key from the clustered index?

If you have a table with a clustered index on the Primary Key (int), is it redundant and bad to have one (ore more) non-clustered indexes that include that primary key column as one of the columns in the non-clustered index? ...

Delphi SetLength Custom Indexing

In Delphi, it is possible to create an array of the type var Arr: array[2..N] of MyType; which is an array of N - 1 elements indexed from 2 to N. If we instead declare a dynamic array var Arr: array of MyType and later allocate N - 1 elements by means of SetLength(Arr, N - 1) then the elements will be indexed from 0 to N - ...

How-to index arrays (tags) in CouchDB using couchdb-lucene

The setup: I have a project that is using CouchDB. The documents will have a field called "tags". This "tags" field is an array of strings (e.g., "tags":["tag1","tag2","etc"]). I am using couchdb-lucene as my search provider. The question: What function can be used to get couchdb-lucene to index the elements of "tags"? If you have...

Adding # & search sign to TableIndex in UITableView

In iPhone native Phone book - there is a search character at the top & # character at the bottom. I want to add both of that character in my table Index. Currently I have implemented following code. atoz=[[NSMutableArray alloc] init]; for(int i=0;i<26;i++){ [atoz addObject:[NSString stringWithFormat:@"%c",i+65]]; } ...

javascript increment index in funciton

I'm just trying to figure out how to create an index inside a function so I can keep track of the items its generating and I'm not sure how to do this seems like I should know this.. addLocation(options,location) funciton addLocation(options,location){ $('#list').append('<li class="location"><div>'+location.label+'</div>'+ ...

Creating an index on a view with OpenQuery

SQL Server doesn't allow creating an view with schema binding where the view query uses OpenQuery as shown below. Is there a way or a work-around to create an index on such a view? ...

SQL Server 2008: Disable index on one particular table partition

I am working with a big table (~100.000.000 rows) in SQL Server 2008. Frequently, I need to add and remove batches of ~30.000.000 rows to and from this table. Currently, before loading a large batch into the table, I disable indexes, I insert the data, then I rebuild the index. I have measured this to be the fastest approach. Since rece...

How to check if googlebot will index a given url ?

We're doing a whitelabel site, which mustn't be google indexed. Does anyone know a tool to check if the googlebot will index a given url ? I've put <meta name="robots" content="noindex" /> on all pages, so it shouldn't be indexed - however I'd rather be 110% certain by testing it. I know I could use robots.txt, however the problem wit...

Best indexing strategy for several varchar columns in Postgres

I have a table with 10 columns that need to be searchable (the table itself has about 20 columns). So the user will enter query criteria for at least one of the columns but possibly all ten. All non-empty criteria is then put into an AND condition Suppose the user provided non-empty criteria for column1 and column4 and column8 the query...

Multi-variable indexes in postgres

Im looking at an application where I will be doing quite a few SELECTs where I am trying to find column_a = x AND column_b = y. Is the correct to create that index that something like the following? CREATE INDEX index_name ON table (column_a, column_b) ...

Index for wildcard match of end of string

I have a table of phone numbers, storing the phone number as varchar(20). I have a requirement to implement searching of both entire numbers, but also on only the last part of the number, so a typical query will be: SELECT * FROM PhoneNumbers WHERE Number LIKE '%1234' How can I put an index on the Number column to make those searchs e...

Will creating index help in this case

I'm still a learning user of SQL-SERVER2005. Here is my table structure CREATE TABLE [dbo].[Trn_PostingGroups]( [ControlGroup] [char](5) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [PracticeCode] [char](5) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [ScanDate] [smalldatetime] NULL, [DepositDate] [smalldatetime] NULL, [NameOfFile]...

Indexing datetime in MySQL

What is the best way to index a datetime in MySQL? Which method is faster: Store the datetime as a double (via unix timestamp) Store the datetime as a datetime The application generating the timestamp data can output either format. Unfortunately, datetime will be a key for this particular data structure so speed will matter. Also,...

Math Question: Is it possible to calculate the row position as you loop through a cartesian product of two arrays?

Is it possible to calculate the row position in the cartesian product of two arrays? For example if you have one array of two rows and another of three rows it's easy to calculate the size of the cartesian product (Array1.Rows.Count * Array2.Rows.Count = 6), but you can't iterate through each array and just use the product of the respec...

Covering Index versus Clustered Index (Database Index)

Hi, I'm working on a database system and it's indexes, but I'm having a really hard time seing the clear difference between a covering index and a clustered index. I've googled my way around but hasn't got a clear cut answer on: What is the differences between the two types of indexes When do I use Covering index and when do I use Cl...

Enforcing a query in MySql to use a specific index

Hi, I have large table. consisting of only 3 columns (id(INT),bookmarkID(INT),tagID(INT)).I have two BTREE indexes one for each bookmarkID and tagID columns.This table has about 21 Million records. I am trying to run this query: SELECT bookmarkID,COUNT(bookmarkID) AS count FROM bookmark_tag_map GROUP BY tagID,bookmarkID HAVING tagID IN ...

Effects of order of columns, while defining an index on them, on the performance of the queries

Hi, Does order of the columns in an Index definition for a table in a database has any effect on the performance? for e.g. are these two queries different ? CREATE INDEX xxx ON tablex(col1,col2) CREATE INDEX xxx ON tablex(col2,col1) what about the in case that I use a BTREE index? I am using Mysql. thanks ...

A question about indexes regarding to the gain of inserts & updates in database

Hi, I’m having a question about the fine line between the gain of an index to a table there is growing steadily in size every month and the gain of queries with an index. The situation is, that I’ve two tables, Table1 and Table2. Each table grows slowly but regularly each month (with about 100 new rows for Table1 and a couple of rows f...

Explaining verity index and document search limits

As present, we currently have a CF8 standard edition server which have some limitations around verity indexing. According to Adobe Verity Server has the following document search limits (limits are for all collections registered to Verity Server): - 10,000 documents for ColdFusion Developer Edition - 125,000 documents for ColdFusio...