indexing

Superset Search

I'm looking for an algorithm to solve the following in a reasonable amount of time. Given a set of sets, find all such sets that are subsets of a given set. For example, if you have a set of search terms like ["stack overflow", "foo bar", ...], then given a document D, find all search terms whose words all appear in D. I have found tw...

SQL Server Indexed View syntax for joined DB

I'm trying to set up an index on a VIEW of mine. First error was 1939, Schema Binding required. Ok, no problem with that. ALTER VIEW xyz WITH SCHEMABINDING AS abc Now, in this VIEW I'm using one local table [dbo].][ReleantTable] and two joined tables from other databases on the same server: OtherDbName..OtherRelevantTable Altering ...

Why is my index getting fragmented?

I have a simple little table (just 8 fields) an hour ago I rebuilt one of the indexes on the table, which reset it to 0% fragmentation, but now it’s up to 38%. The table itself has 400k records in it, but only 158 new ones have been inserted since I rebuilt the index, there have been no updates to records but perhaps a couple of deletes...

Why does my TileList selectedIndex not get updated?

In the code below, the presentedAlbumIndex is used to control the selectedIndex of the TileList. Item "five" is initially selected. Whenever the button is pressed the first item in the array is deleted, and the presentedAlbumIndex is decremented. In theory, the selected index should stay with "five" every time the button is clicked (u...

MySQL indexes - how many are enough?

I'm trying to fine-tune my MySQL server so i check my settings, analyzing slow-query log, simplify my queries if possible. Sometimes enough if i indexing correctly sometimes not. I've read somewhere (pls correct me if this is stupidity) more indexes than i needed make the same effect like i haven't any of them. How many indexes are eno...

String matching in Oracle 10g where either side can have wildcards

Test case schema and data follow as: create table tmp ( vals varchar(8), mask varchar(8) ); insert into tmp values ('12345678',' '); insert into tmp values ('12_45678',' _ '); insert into tmp values ('12345678',' _ '); insert into tmp values ('92345678',' '); insert into tmp values ('92345678',' _ ')...

Iphone UITableView move Index with prefilled values

Hi Guys, I'm trying to enable my UITableView for being able to change the Index of values. Means that I have currently 6 values within an NSMutableArray which actually fills the UITableView. The user is already able to change the position of the Entries of the UITableView/MSMutableArray. As long as the application runs, the index cha...

Uniqueidentifier PK: Is a SQL Server heap the right choice?

OK. I've read things here and there about SQL Server heaps, but nothing too definitive to really guide me. I am going to try to measure performance, but was hoping for some guidance on what I should be looking into. This is SQL Server 2008 Enterprise. Here are the tables: Jobs JobID (PK, GUID, externally generated) StartDate (datetime...

Searching and sorting by language

Hi all, I am testing Lucene.NET for our searching requirements, and I've got couple of questions. We have documents in XML format. Every document contains multi-language text. The number of languages and the languages itself vary from document to document. See example below: <document>This is a sample document, which is describing a <...

Are unique indexes better for column search performance? (PGSQL & MySQL)

I am curious as to whether CREATE INDEX idx ON tbl (columns); vs. CREATE UNIQUE INDEX idx ON tbl (columns); has a significant algorithmic performance benefit in PostgreSQL or MySQL implementations when scanning the indexed column(s), or whether the UNIQUE keyword simply introduces a unique constraint alongside the index. I imagin...

What is the impact of setting up an index on varchar field?

I've got a table with approx 7 million rows of data. The schema is something like: ID - int (Primary Key) Name - Varchar(250) Null ... I want to set an index up for the Name column to speed up searches. e.g Select * from table where name = 'ABC' But what is the impact of setting up an Index on a varchar field? Index size? Does ...

In SQLite3, will this select statement benefit from two indexes?

I am using a DBD::SQLite in memory database. I have defined the following indexes for a table: CREATE INDEX x ON ss (a, b); CREATE INDEX y ON ss (c, d, e, o); Will the following select statement use these two indexes? SELECT f, g FROM ss WHERE a = ? AND b = ? AND c = ? AND d = ? AND e = ? And, I should only make indexes on those co...

Index Tuning for SSIS tasks

I am loading tables in my warehouse using SSIS. Since my SSIS is slow, it seemed like a great idea to build indexes on the tables. There are no primary keys (and therefore, foreign keys), indexes (clustered or otherwise), constraints, on this warehouse. In other words, it is 100% efficiency free. We are going to put indexes based on ...

Why use the INCLUDE clause when creating an index?

While studying for the 70-433 exam I noticed you can create a covering index in one of the following two ways. CREATE INDEX idx1 ON MyTable (Col1, Col2, Col3) -- OR -- CREATE INDEX idx1 ON MyTable (Col1) INCLUDE (Col2, Col3) The INCLUDE clause is new to me. Why would you use it and what guidelines would you suggest in determining wh...

Why would Google (or Googlebot) index a page returning a 500 error?

Googlebot has been occasionally indexing one of our sites with a bad query string parameter. I am not sure how it is getting this query string parameter (there don't appear to be any sites linking to us with bad links, and nothing in our site is inserting the bad value). The bad parameter causes the site to throw a 500 error, as we expec...

Proper indexing in a big table

I have a table with 8 million records that looks like this: CREATE TABLE `bdp_dosis` ( `ID_INSTITUTION` varchar(4) NOT NULL default '', `ID_SERVICE` char(2) NOT NULL default '', `SECUENCIAL` char(3) NOT NULL default '', `TYPE` char(1) NOT NULL default '', `DATE_LECTURA` varchar(8) NOT NULL default '', `ID_TARJETA` varchar(9)...

Good Language for Spider and Indexer

I love Ruby and its framework, but I don't think that Ruby On Rails is the best choise to develop a Feed-parser and Indexer. Maybe Python or Java are better choises. What language do you suggest? ...

Will <noscript> hide the rest of the static content to Google crawlers?

This should be an easy one for someone: Will the <noscript> element cause the HTML page to serve only the content within the <noscript> tag itself to google crawlers and hide all the rest of my static content causing it so not to be indexed? Thanks! ...

SQL Server - index on a computed column?

I'm joining to a table dozens of different times, and every time, I join (or filter) based on the results of a SUBSTRING of one of the columns (it's a string, but left-padded with zeros, and I don't care about the last four digits). As a result, even though this column is indexed and my query would use the index, it does a table scan bec...

Boost Multi-Index Custom Composite Key Comparer

I'm looking to write a custom comparer for a boost ordered_non_unique index with a composite key. I'm not exactly sure how to do this. Boost has a composite_key_comparer, but that won't work for me, because one of the comparers for a member of the key depends on a previous member. This is a simplified example, but I want the index to ...