indexing

Naming standard for INCLUDE indexes?

We use a fairly straightforward naming standard for indexes that I can validate programmatically, but I am struggling with naming indexes with INCLUDE columns. If I do it based on a simple formula, it's too easy to build names that are too long. Then my programmatic validation fails, and I end up with truncated names. For those of you u...

How do indexes work on views?

Can someone please explain to me in simple English how an index on a view works? I have a fairly simple understanding of indexes on tables; how would indexing a view work differently from just letting the indexes on the underlying tables do their thing naturally? ...

How to improve performance of non-scalar aggregations on denormalized tables

Suppose we have a denormalized table with about 80 columns, and grows at the rate of ~10 million rows (about 5GB) per month. We currently have 3 1/2 years of data (~400M rows, ~200GB). We create a clustered index to best suit retrieving data from the table on the following columns that serve as our primary key... [FileDate] ASC, ...

Should I index a field if I'll only search with FIELD is not null?

I have a table with a nullable datetime field. I'll execute queries like this: select * from TABLE where FIELD is not null select * from TABLE where FIELD is null Should I index this field or is not necessary? I will NOT search for some datetime value in that field. ...

Entity Framework use of indexes and foreign keys

I want to be able to search a table quite quickly using the Entity Framework, say if I have a Contacts table, a JobsToDo table and a matrix table linking the two tables e.g Contacts_JobsToDo_Mtx and I specify two foreign keys in the Contacts_JobsToDo_Mtx table, if I wanted to search this Mtx table, do I need to specify an index on the tw...

Will Full text search consider indexes?

Ok I have a full text search index created on my JobsToDo table, but what I'm concerned about is if this is rendering my other indexes on the table useless. I have a normal nonclustered index on the CreatedDate field in this table. So when I run my full text search it returns results, I then filter my full text search by CreatedDate >= G...

Two questions about mongodb and indexing

Hello, Two questions: If I remove all the data inside a collection (db.mycollection.remove({})) will the indexing information I created previously be lost? How often (how many more entries must I have) should I recreate the index? Thank you ...

Using char index to find numeric values

I have a column on a mysql table that stores mostly numeric values, but sometimes strings. It's defined as VARCHAR(20). There is an index on this column for the first four characters. ADD INDEX `refNumber` USING BTREE(`refNumber`(4)); Since the field is mostly numeric, it is useful for the user to be able to query for values that fall...

Static SQL Server Indexes

Is it possible to create unclustered indexes in SQL Server 2005 that are not updated as data is changed (insert/delete/udpate) so I can ensure a stable set of data to report on? Our data is changing frequently an I want to be able to snapshot it at a point with out having a column to show the latest change date/time and only selecting d...

Can Lucene return several search results from a single indexed file?

I am using Lucene to index and search a small number of large documents. Using the demo from the Lucene site I have indexed the documents and am able to search them. However, the search result is not particularly useful as it points to the file of the document. With very large documents this isn't particularly useful. I am wondering if ...

MySQL - Prevent duplicate records in table via index?

Using MySQL 5 I have a table like this: date (varchar) door (varchar) shift (varchar) route (varchar) trailer (varchar) + other fields This table contains user generated content (copied in from another 'master' table) and to prevent the users from creating the same data more than 1x the table has a unique index created based on the f...

Is there an efficient way to index inside words in SQL server 2008?

We have a a few queries in our system that use LIKE '%'+@SomeCriteria+'%' to search a for a person's name. We are talking VARCHAR(50) fields in this case. We would really like to allow our users the ability to search within names. The way I understand it, indexing the field will only make this faster if we search for the first part of...

indexing pros cons in sql server 2008

I am working on social networking site. now our team decide to store user profile in denormalized manner. so our table structure is like this here attribute it means one fields for user profile e.g. Firstname,LastName,BirthDate etc... and groups means name of a group of fields e.g. Personal Details, Academic Info, Achievements etc.. *...

Lucene.net intermitantly indexed documents not appearing in the

I've got an issue which shows up intermitantly in my unit tests and I can't work out why. The unit test itself is adding multiple documents to an index, then trying to query the index to get the documents back out again. So 95% of the time it works without any problems. Then the other 5% of the time it cannot retrieve the documents bac...

Paid API to get incoming links to a website?

I'm working on an SEO app that (among other things) shows the number of incoming links to your site over time. There are a few ways to get this data. Scraping Google "link:yoursite.com" results gives you some (not all) of the links they know about, but they aren't too happy if you are doing lots of scraping. Similarly Yahoo has their ...

Need a little clarification on MySQL Indexes

I've been thinking about my database indexes lately, in the past I just kind of non-chalantly threw them in as an afterthought, and never really put much thought into if they are correct or even helping. I've read conflicting information, some say that more indexes are better and others that too many indexes are bad, so I'm hoping to g...

MySQL optimisation by sorting the rows

Hello everybody! I am not an expert of MySQL, and I have search a lot about the following problem without finding the solution. So, I'm using a MySQL table with this structure: CREATE TABLE photos ( file varchar(30) NOT NULL default "", place tinytext NOT NULL default "", description tinytext NOT NULL default "", type char(1) ...

SQL Server (2005) - "Deleted On" DATETIME and Indexing

I have a question related to database design. The database that I'm working with requires data to treated in some way that it is never physically deleted. We started going down a path of adding a "DeleteDateTime" column to some tables, that is NULL by default but once stamped would mark a record as deleted. This gives us the ability ar...

Implementing proximity operators in full-text search

Some databases (e.g. Scopus and Web of Science) implement proximity operators such as SAME or NEAR. With these the user can define that he wants his search words to be within a set number of words from each other or in the same sentence or paragraph. I just started wondering how this is implemented. Full-text search as is is not that co...

[XML+XSL+GOOGLE] website to be indexed in google?

Hi, I am not sure what or if I am doing something wrong at the website http://www.jode.com.br it uses XML and XSL transformation on the browser and after a week it still does not appear in google. it is normally using google-analytics, I can see the visits etc, but in google i got nothing I put meta tag in the xsl and in the xml j...