indexing

read only databases and index fragmentation in SQL Server

I have a number of read only databases alter database [ReferenceData] set READ_ONLY that is used by our application and was wondering what type of things I can tweak for maximum performance? So far, I came up with the following goals: Force padding in indexes to 100% fill factor index fragementation be less than 10% If space isn't a p...

Indexing this mysql query

I am querying database with follwing query. This query takes 21 seconds to execute. I have check it by explain query. I have index on fields groupId , batchId separately. EXPLAIN SELECT message, sentOn, maskId, isDndCheck, contentType FROM sms_histories WHERE groupId = 1750 GROUP BY batchId ORDER BY batchId DESC LIMIT 0 , 1 I am gett...

index search feature for UITableView

I'm using an index search feature for a tableview. at the moment it shows just the first letter of the index to display. is there a way to display the full name of a section instead of just the first letter? so instead of: A B C it would display Appetizers Entrees Deserts here's what I'm currently using: (NSArray *)sectionInde...

robots.txt How to not allow engines to crawl urls with this in url: “http:

Disallow: /*“http: is what I've been using - my guess is I may need to escape the quotation mark somehow. In Google webmaster tools, it's not even reading that quotation mark (where it allows you to see the robots.txt file and test it on a few urls). On Google Webmaster Tools, it displays the robots.txt file without the quotes for ...

most efficient way to add index to large mysql table

I have a mysql database with a particular table with a little over 6 million rows and no indexes. A simple query such as SELECT ... FROM log ORDER BY log_date ASC will take an unacceptable amount of time. I obviously need to add indexes to the table, but am unsure of the most efficient way to go about this. 1) My first option would be t...

Does Google index HTML content supplied by the Object tag

This might be a weird question, but I've been unable to find an answer. Assuming I were to use an Object tag to embed an HTML snippet from an outside source (different server), how does Googles spider view that data? Does it pull in the data source like a browser would or does it only view the alternate content found between the Object t...

Indexing file paths or URIs in Lucene

Some of the documents I store in Lucene have fields that contain file paths or URIs. I'd like users to be able to retrieve these documents if their query terms contain a path or URI segment. For example, if the path is C:\home\user\research\whitepapers\analysis\detail.txt I'd like the user to be able to find it by queriying for path...

MySQL: Which indexes to use for a simple range select?

Hello, I have a table with ~30 million rows ( and growing! ) and currently i have some problems with a simple range select. The query, looks like this one: SELECT SUM( CEIL( dlvSize / 100 ) ) as numItems FROM log WHERE timeLogged BETWEEN 1000000 AND 2000000 AND user = 'example'</pre> It takes minutes to finish and i think that the s...

MySQL: What are the drawbacks of indexing an additional field?

I have the talbe like that: CREATE TABLE UserTrans ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, `user_id` int(10) unsigned NOT NULL, `transaction_id` varchar(255) NOT NULL default '0', `source` varchar(100) NOT NULL, PRIMARY KEY (`id`), KEY `user_id` (`user_id`) ) with innodb engine. The transaction_id is var becau...

Javascript: Sort array and return an array of indicies that indicates the position of the sorted elements with respect to the original elements.

Suppose I have a Javascript array, like so: var test = ['b', 'c', 'd', 'a']; I want to sort the array. Obviously, I can just do this to sort the array: test.sort(); //Now test is ['a', 'b', 'c', 'd'] But what I really want is an array of indices that indicates the position of the sorted elements with respect to the original elemen...

Sql single index or multiple index

Let's say I have the Products table. On my UI, I allow the user to search by name, description, code The user can only search on criteria. Should I create an index for each criteria : name, description, code or create ONE single index for all 3? What will make you choose one versus the other? ...

How do I ask/hint to Google not to index something on a page?

I have a web site that mostly displays images that contain text. It is heavy with JavaScript. In a noscript tag we have the usual "You must have JavaScript enabled" message followed by the text extracted from the image. My problem is that Google indexes the "You must have JavaScript enabled" message. So when you get a hit on my site, thi...

Is there a vectorized way to operate on a different number of values per column in MATLAB?

In MATLAB, is there a more concise way to handle discrete conditional indexing by column than using a for loop? Here's my code: x=[1 2 3;4 5 6;7 8 9]; w=[5 3 2]; q=zeros(3,1); for i = 1:3 q(i)=mean(x(x(:,i)>w(i),i)); end q My goal is to take the mean of the top x% of a set of values for each column. The above code works, but I'm ...

The correct way of using jQuery index() ; ? Its always returning -1

Not sure why this is happening. But everytime I do (elem).index(); , it always returns -1 . Why is that? How can I find the index of an object? ...

full text search with spelling changes/mistakes

We have many objects and each objects comes with around 100-200 words description. (for example a book's author name and small summary). User gives input as series for words. How to implement search with approximate text and minor spelling changes? for example "Joshua Bloch", "Joshua blosh", joshua block" could lead to same text resu...

googlebot vs 302 document moved message

Hi, I tried searching for the same issue but couldnt find the right answer for me. Anyway, I have a site http://mysite.com but the index.php from the root is going to redirect to a subfolder say, http://mysite.com/pages/index.php and on google webmaster tools fetch as googlebot i get the document moved message. And no indexing seems to...

How many indexes should be created for faster queries

My object model is given below and would like your inputs on the number of indexes to create for faster query responses (on h2, mysql). Assumptions and questions are given below the following model. @Entity @Table(name = "user") public class User { @Id @GeneratedValue(strategy = IDENTITY) @Column(name = "id", unique = true...

In MongoDB, is there anyway to tell what index is on a collection besides using coll.find({...}).explain()?

I think explain() will tell any possible index it can use. How about just showing all the indexes defined on the collection? (or even for the whole db?) ...

In MongoDB, if an index is on 3 fields, we can use that index when querying on 2 fields? (wildcard on the 3rd field)

If there is an index on page_type, our_id, date and when querying, db.analytics.find({page_type: 'ingredients', ga_date: {$gte : new Date('Wed Sep 08 2010 12:00:00 GMT-0800')}}) db.analytics.find({page_type: 'ingredients', ga_date: {$gte : new Date('Wed Sep 08 2010 12:00:00 GMT-0800')}}).explain() if our_id is omitted, or da...

How do you create an index across different tables

Table A consists of (id, fieldA, fieldB, fieldC, fieldD) Table B consists of (id, tableA-id, fieldE, fieldF, fieldG) My queries looks like this:- 1. select * from tableB b, tableA a where a.fieldA=? and a.fieldB=? and a.fieldC=? and a.fieldD=? and (b.fieldF >= '09/01/10' and b.fieldF <= '09/30/10'); 2. select * from tableB b, ...