index

When dropping a constraint will the supporting indexes also be dropped?

Hello, I am trying to memorize some sql syntax and I have gotten the ALTER TABLE ADD CONSTRAINT syntax down. I believe I am correct when I say that when you use this syntax to add a FOREIGN KEY or PRIMARY KEY constraint, that sql server automatically creates indexes to support the constraint operations. (Is that true...or is it only t...

How important is the order of columns in indexes?

I've heard that you should put columns that will be the most selective at the beginning of the index declaration. Example: CREATE NONCLUSTERED INDEX MyINDX on Table1 ( MostSelective, SecondMost, Least ) First off, is what I'm saying correct? If so, am i likely to see large differences in performance by rearranging the order...

How can I grab the character value of a string, given an index ... in some Sql code?

Hi folks, i've got some string in some sql. i need to find out what the character is, for that string, given a index. eg. DECLARE @someString NVARCHAR(MAX) = 'hi folks' DECLARE @index INT = 4 -- assuming the first index is 1, not 0. now .. how do i get the character at 4th index slot, which is an 'f', in that example above. thanks...

Tab index in flex repeater

I have a repeater which contains a text box and combo Box. I have set tab Index on both of them. When I navigate using the tab button on the keyboard it does not navigate in the correct order. Can you help me please. Thanx ...

What is the algorithm to search an index for multiple values?

This is actually a real problem I'm working on, but for simplicity, let's pretend I'm Google. Say the user searches for "nanoscale tupperware". There aren't very many pages with both words... only about 3k. But there are ~2 million pages with "nanoscale" and ~4 million with "tupperware". Still, Google finds the 3k for me in 0.3 seconds....

Is the index on `parent` necessary here?

Create Table: CREATE TABLE `category` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `parent` bigint(20) unsigned DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`), KEY `parent_idx` (`parent`), CONSTRAINT `category_parent_category_id` FOREIGN KEY (`parent`) REFERENCES `category`...

Sorting a table physically in Delphi

Delphi does not seem to like multi-field indexes. How do I physically sort a a table so that I wind up with a table that has the rows in the desired order? Example: mytable.dbf Field Field-Name Field-Type Size 0 Payer Character 35 1 Payee Character 35 2 PayDate Date 3 Amount ...

TabBar Controller Selection color

Hello, Ia there any one who have implemented for the TabBar Controller application in which on selection of tab item it shows different colour other than gray and blue color. ...

Insufficient privilege when creating an index in Oracle 11g

I am trying to create an index in Oracle, my ddl : create index OMD_DOCTEXT2_CTX on table_name(col_name) indextype is ctxsys.context local parameters ('datastore CTXSYS.FILE_DATASTORE filter ctxsys.null_filter lexer E2LEX wordlist E2WORDLIST stoplist E2STOP section group E2GROUP') parallel 4; I am getting error : ORA-29855: error oc...

phpbb - how to restrict access to Board index

hello to all, my client wants me to create a series of websites, each with its own forum. i have installed and played around with phpbb before and it is my understanding that each installation is capable of creating many forums. i already created a few using the same installation in another project. in each forum's "main page" there i...

php & mySQL: Query does not use index in table join

Hi, I am trying to list all the book_sales information for a particular book author. So I have a query and it's not using Index to lookup records. The following is my tables structure: -- Table structure for table `books` CREATE TABLE IF NOT EXISTS `books` ( `book_id` int(11) NOT NULL auto_increment, `author_id` int(11) unsigned...

index , pointer , iterator , which is better ? when it comes to vectors

hi i'm doing a program that needs high performance of handling vector elements vector<Class_A> object ; 1- which one is fastest to access the elements 2- which is more code simpler and not complex to deal with index ? iterator ? pointer ? ...

How to read a Lucene index?

Hi! I'm working on a project for which I want to build a tag cloud by reading a Lucene index and pruning it down. I didn't set up the Lucene engine, it was someone else in the team, now I just want to read its index. Do you how to do that in Java? ...

Two single-column indexes vs one two-column index in MySQL?

I'm faced with the following and I'm not sure what's best practice. Consider the following table (which will get large): id PK | giver_id FK | recipient_id FK | date I'm using InnoDB and from what I understand, it creates indices automatically for the two foreign key columns. However, I'll also be doing lots of queries where I need to...

Bunch of Inserts (transaction) is quicker than each insert separatelly

Bunch of Inserts (transaction) is quicker than each insert separatelly, i think so, maybe not, tell me who check, is there a difference, maybe if many indexes on a table. ...

jQuery - eq() seems to refer to a different element than index() - What gives? :/

Here's my code: UPDATED JS jQuery(document).ready(function() { var cookieName = 'activeMenus'; var openMenus = (jQuery.cookie(cookieName) == null) ? 0 : jQuery.cookie(cookieName).substring(1).split(','); var wookie = ''; jQuery('ul.menu li ul').css('display', 'none'); // Reopen all the menus from the cookie if (...

When would you define an index with a descending order?

Looking through a few SQL implementations, I noticed that most DBMSs support defining an index on a column with a descinding order, e.g. CREATE INDEX anIndex ON aTable (aColumn DESC); When would this be advantageous over an ASC index? Why is ASC or DESC part of the index definition? If the implementation of an index is efficient (B-t...

OperationalError creating an index in sqlite

EDIT: TL;DR version I typed this CREATE INDEX IF NOT EXISTS IDX_FILE_SIZE table_name (file_size); instead of this CREATE INDEX IF NOT EXISTS IDX_FILE_SIZE ON table_name (file_size); Don't do that. ...

MYSQL order by insists on using filesort.

Hi All. I need to optimize a MYSQL query doing an order by. No matter what I do, mysql ends up doing a filesort instead of using the index. Here's my table ddl... (Yes, In this case the DAYSTAMP and TIMESTAMP columns are exactly the same). CREATE TABLE DB_PROBE.TBL_PROBE_DAILY ( DAYSTAMP date NOT NULL, TIMESTAMP date NOT NULL, SOURCE_...

Single column, long index pages in LaTeX

Been having some trouble implementing a single-column index in LaTeX. I've been employing the idxlayout package along with multind in order to create an index that is catenated from a slew of other source idx files. First, the index is ALWAYS set to use two columns. Even though the idxlayout package is set to columns=1, and the itemla...