indexing

does 'KEY' in SHOW CREATE TABLE mean a column is indexed?

I am dealing with a db I did not create. I will be issuing a number of long-running queries involving three integer columns of a large table: id (a primary key), x and y. (I won't be writing/updating records; just issuing queries.) SHOW CREATE TABLE shows that: `primary_key` int(11) NOT NULL auto_increment, `x` int(11) default NULL, `y...

How to Optimize the Use of the "OR" Clause When Used with Parameters (SQL Server 2008)

I wonder if there is any wise way to rewrite the following query so that the indexes on columns get used by optimizer? Create Procedure select_Proc1 @Key1 int=0, @Key2 int=0 As BEGIN Select key3 From Or_Table Where (@key1 =0 OR Key1 =@Key1) AND (@key2 =0 OR Key2 =@Key2) END GO Even though columns in the W...

Search engine indexing flash website ?

I am working on a website completely designed in Flex (flash).Can you please help suggesting whether search engines (like google/bing) can index flash content or not.If not then how do the websites made entirely in flash make themselves available on these search engines. Thanks for your help. ...

Self-indexing (and traditional indexing) algorithms - Implementations and advice to share?

As part of a research project I'm currently looking for open-source implementations of self-indexing algorithms, i.e. a compressed form of the traditional inverted index yielding nice characteristics such as faster lookup and/or less consumed space. Do you know of any open-source implementations of self-indexing algorithms? Do you have ...

How do I calculate and use a Morton (z-index) value to index geodata with PHP/MySQL?

I have a MySQL table of records, each with a lat/lng coordinate. Searches are conducted on this data based on a center point and a radius (any records within the radius is returned). I'm using the spherical law of cosines to calculate the distance within my query. My problem is that indexing the geodata is horribly inefficient (lat/lng v...

Does a SQL Server Computed Column require "persistence" in order for it to be indexed efficiently?

Does a SQL Server Computed Column require "persistence" in order for it to be indexed efficiently? It's a Name and a LoweredName (computed) column combination. So I don't believe it deals with the precision stuff mentioned in a MSDN article. ...

performing a SELECT TOP query with an ORDER BY - should I use an index or a 'sorted view' to increase performance

This query (part of a sproc) will be executed quite a lot: SELECT TOP (@numRecords) BlogPost.postId,BlogPost.creationDate, BlogPost.header,BlogPost.markedupContentAbstract FROM dbo.BlogPost ORDER BY BlogPost.creationDate DESC Should I put an index on the 'creationDate' field in the BlogPost table? Should I have a view wh...

drupal indexing of uploaded documents (pdf, word, etc)

Hi there, is it possible to index uploaded documents in drupal and make them "searchable" via lucene or solr? ...

Should I also index columns included in a PRIMARY KEY?

This question suddenly popped into my head... I have a table that ties two other tables together based on their ID. The CREATE TABLE looks like this: CREATE TABLE `ticket_contact` ( `ticket_id` INT NOT NULL, `entity_id` INT NOT NULL, `notify` INT NOT NULL DEFAULT 0, PRIMARY KEY (`ticket_id`, `entity_id`...

Find out If index and table statistics are out of date

Hi, I Update indexes with full scan weekly. so when I run: SELECT name AS index_name, STATS_DATE(OBJECT_ID, index_id) AS StatsUpdated FROM sys.indexes Ref: link text I expect it to show me that all indexes were updated this weekend. But there are several records which look like: index_name StatsUpdated clust 2005-10-14 01:36:2...

Is there a downside to adding numerous indexes to tables?

I am creating a new DB and was wondering if there was any downside to adding numerous indexes to tables that I think may require one. If I create an index but end up not utilizing it will it cause any issues? ...

Should I use AI on these fields in MySQL?

I have this db below. I wonder how I should use the ID to identify each record. Everything is connected from the classified_table! Two Questions: Should I use AI on every PK in this case? Could somebody give me the FULL code for selecting an entire classified from only an ad_id ("bmw_330ci_8939483" for example)? I am new to normalize...

Indexing an alphabetically sorted list

I have an array with a list of objects sorted alphabetically ignoring the letters case (used a lowerCaseString method) and I need to sort it into an array of arrays one for each letter +1 for non alpha characters. A simple way of doing it would be to loop through the source array with a giant 27 stack deep if else if else if else.... Ne...

Does LINQ2SQL make use of table indexes?

Does LINQ2SQL make use of table indexes when executing a query? ...

Separate table in case of surrogate key?

I have been reading the heated debates on composite vs surrogate keys on Stack Overflow and other websites, and even though puzzled about some of the arguments given, I feel I am aware of the pros and cons of each. I feel tempted to go for surrogate keys, but now I have another question. Let me explain my situation. I have a table consi...

Index for BETWEEN function in SQLite

I'm working on an analysis application which operates on datasets up to 10,000,000 entries. I'm only writing to this database during initial import, not afterwards. Right now this dataset is stored in SQLite - mostly for speed reasons. Unfortunately, I find the speed disappointing, mostly because SQLite can't use indexes queries like ...

How do I build a on-the-fly search engine? (with ranking/relevancy)

I was a heavy user in Sphinx and Lucene. Sphinx just takes a database, indexes it. And you call Sphinx to get the ID's. But what if I want to create a search engine that's very tiny. Just a few rows of data and a few paragraphs of words? The trick is, the rows of data is constantly changing. So, I can't have an "index". I want to be ...

Most efficient way to find index'd records in mysql?

hey all I have tables with millions of rows in them and some of the select queries key off of 3 fields company, user, articleid would it be faster to create a composite index of those three fields as a key or MD5 (company, user, articleid) together and then index the hash that's created. ? thanks ...

Edited- MySQL. Large MyISAM table (40mln records) having index that is very slow and huge in size on disk

The table contains about 40,000,000 records having: CREATE TABLE `event` ( `id` bigint(20) unsigned NOT NULL auto_increment, `some_other_id_not_fk` int(10) unsigned default NOT NULL, `event_time` datetime NOT NULL, `radius` float default NULL, `how_heavy` smallint(6) default NULL, PRIMARY KEY (`id`), KEY `event_some_other...

Google indexing to a staging server.

A site that I was working is resolving to a staging server through google. I've removed all the information. How long does it take for google to update the information so that it does not show up. is there anyone that I can contact to move this along? ...