indexing

Are upper bounds of indexed ranges always assumed to be exclusive?

So in Java, whenever an indexed range is given, the upper bound is almost always exclusive. From java.lang.String: substring(int beginIndex, int endIndex) Returns a new string that is a substring of this string. The substring begins at the specified beginIndex and extends to the character at index endIndex - 1 From java.util....

Prepare your site images for google image search indexing

Hi, I'm trying to understand how can I do to let my site be reachable from google image search spiders. I like how last.fm solution, and I thought to use a technique like his staff do to let google find artists images on their pages. When I'm looking for an artist and I search it on google image search, as often as not I find an image f...

Error while configuring Sql server 2005 for full text search

I am trying to index a table for full text search in a SQL server 2005. When I select the change tracking as Automatic and click on the next button, I get the following error TITLE: Microsoft SQL Server This wizard will close because it encountered the following error: For help, click: http://go.microsoft.com/fwlink?P...

Why does Sql Server recommends creating an index when it already exist?

I ran a very basic query against one of our table and I noticed that the execution plan query processor is recommending that we create an index on a column The query is SELECT SUM(DATALENGTH(Data)) FROM Item WHERE Namespace = 'http://some_url/some_namespace/' After running, I get the following message // The Query Processor estimat...

Computing unique index for every poker starting hand

As there are 52 cards in a deck we know there are 52 choose 2 = 1326 distinct matchups, however in preflop poker this can be bucketed into 169 different hands such as AK offsuit and AK suited as whether it is A hearts K hearts or A spade K spades it makes no difference preflop. My question is, is there a nice mathematical property in whi...

what is the best way to build inverted index ?

I'm building a small web search engine for searching about 1 million web pages and I want to know What is the best way to build the inverted index ? using the DBMS or What …? from many different views like storage cost, performance, speed of indexing and query? and I don't want to use any open source project for that I want to make my ow...

spatial indexing mysql

i have to integrate spatial indexing in mysql .i got an example i almost done it.in that example INSERT INTO address VALUES('Foobar street 12', GeomFromText('POINT(2671 2500)')); inplace of 2671 and 2500 i have to insert latitude and longitude in below format 35.177 ,-77.11. How is it possibe .Please help me ...

Slow query with unexpected index scan

Hello I have this query: SELECT * FROM sample INNER JOIN test ON sample.sample_number = test.sample_number INNER JOIN result ON test.test_number = result.test_number WHERE sampled_date BETWEEN '2010-03-17 09:00' AND '2010-03-17 12:00' the biggest table here is RESULT, contains 11.1M records. The left 2 tables about 1M. this...

How to know which image is being viewed in UIScrollView? Also, is it possible to loop scrolling for an endless effect?

This is what I'm trying to do, and I'm not sure if it's possible using UIScrollView. First, I don't care about zooming, all I care is that the user is able to scroll through images just like the Photo App, this I got. But how do I know which image he is viewing while using UIScrollView? For instance, if he stops on the 3rd image out of 1...

Is the time cost constant when bulk inserting data into an indexed table?

I have created an archive table which will store data for selecting only. Daily there will be a program to transfer a batch of records into the archive table. There are several columns which are indexed; while others are not. I am concerned with time cost per batch insertion: - 1st batch insertion: N1 - 2nd batch insertion: N2 - 3rd b...

Tell me a situation in which SQL Server indexing is not required

Could you please tell me cases where indexing on an SQL Server table is not required? ...

Indexing Bilingual Sites

Hi all I have a site that supports two languages. The way the user changes the language is by clicking on a language link that will change his session language from A to B and return him to the same page. The problem that I am facing is that Google doesn't index the other language since it is seeing that the language link is the same as...

Solr and web site indexing to create a site search.

I was trying to build a 'site search' on a simple http site. I have a site, lets call it www.mycompany.com, that is pure html. Is there an easy way to use solr to index the entire site to build a full text search using solr as the engine? I googled for a bit and could not find anything specific of the type: Do A Do B ... profit! Le...

Keeping DB Table sorted using multi-field formula (Microsoft SQL Server)

I have a JOB table, with two interesting columns: Creation Date Importance (high - 3, medium 2, low - 1). A JOB record's priority calculated like this: Priority = Importance * (time passed since creation) The problem is, every time I would like to pick 200 jobs with highest priority, and I don't want to resort the table. Is t...

Clever way of building a tag cloud? - Python

Hi folks, I've built a content aggregator and would like to add a tag cloud representing the current trends. Unfortunately this is quite complex, as I have to look for keywords that represent the context of each article. For example words such as I, was, the, amazing, nice have no relation to context. Help would be much appreciated...

How and when to update a MySQL index?

I'm using this SQL query to create an index: $query = "CREATE INDEX id_index2 ON countries(geoname_id, name)"; How do I update the index when new entries are added? Should I run a PHP script with the update query in CRON and run it every night? Is this best practice for automated index updating? ...

Rebuilding indexes does not change the fragmentation % for nonclustered indexes.

For starters, I am no DBA and I am working on rebuilding the indexes. I made use of the amazing TSQL script from msdn to alter index based onthe fragmente percent returned by dm_db_index_physical_stats and if the fragment percent is more than 30 then do a REBUILD or do a REORGANISE. What I found out was, in the first iteration, there ...

Index on column with only 2 distinct values

I am wondering about the performance of this index: I have an "Invalid" varchar(1) column that has 2 values: NULL or 'Y' I have an index on (invalid), as well as (invalid, last_validated) Last_validated is a datetime (this is used for a unrelated SELECT query) I am flagging a small amount of items (1-5%) of rows in the table with thi...

compare two following values in numpy array

What is the best way to touch two following values in an numpy array? example: npdata = np.array([13,15,20,25]) for i in range( len(npdata) ): print npdata[i] - npdata[i+1] this looks really messed up and additionally needs exception code for the last iteration of the loop. any ideas? Thanks! ...

google indexing wrong page

When I google for cms tutorial my website is the first link which is obviously great. Unfortunatly it is showing the Under construction title I was using when I was updating my site. When you click on the link you of course you go to my website but the title link still remains "CMS TUTORIAL SITE - Under construction" in google instead of...