2
голосов
3ответов
6605 просмотров

Index on UNION query?

i've got this union query: (SELECT INSTALLER, INSTALLTIME, RESULT, JOBNUMBER, HONAME, ADDRESS, CITY, STATE, ZIP, NOTES, SMNOTES, '' as priority, PAFS, upsell, TERM, MMRUPGRADE, WARRANTY, EFT FROM ACCOUNTS WHERE INSTALLDATE = '$date' && FUNDINGSTATUS !='DEAD') UNION (SELECT technician,...

0
голосов
1ответов
286 просмотров

sql full text index problem with "score" not updating in a timely fashion

Have full text index on a table for the purpose of searching and producing a list of results based on relevance, I assign relevance based on the highest "score" from the full text index. The table contains 3 columns, a unique ID, a text field in the type (varchar), and the third is a timestamp o...

2
голосов
1ответов
4738 просмотров

Does SAS Proc SQL ever use an index when merging

Consider the following (admittedly long) example. The sample code creates two data sets, data one with "key" variables i,j,k and data two with key variables j,k and a "value" variable x. I'd like to merge these two data sets as efficiently as possible. Both of the data sets are indexed with res...

11
голосов
5ответов
1489 просмотров

Difference between 2 indexes with columns defined in reverse order

Are there any differences between following two indexes? IDX_IndexTables_1 IDX_IndexTables_2 If there are any, what are the differences? create table IndexTables ( id int identity(1, 1) primary key, val1 nvarchar(100), val2 nvarchar(100), ) create index IDX_IndexTables_1 on Ind...

1
голосов
2ответов
130 просмотров

What are the methods for identifying unnecessary columns within a covering index?

What methods are there for identifying superfluous columns in covering indices: columns which are never searched against, and therefore may be extracted into Includes, or even removed completely without affecting the applicability of the index?

3
голосов
2ответов
289 просмотров

Rails ActiveRecord Table Indexes - When should they be used?

I have heard over and over that you should add indexes to any foreign key you will be doing joins on. I have also heard you should have indexes for fields you will do queries on. Does anyone have a fairly exhaustive list or set of guidelines around when and when not to add indexes? There mus...

1
голосов
3ответов
1399 просмотров

Oracle reverse index and query

If I create a reverse index in Oracle on a VARCHAR2 column do I also need to reverse the value used in the WHERE clause? CREATE INDEX myindex ON myTable(name) REVERSE; SELECT name FROM myTable WHERE name='Peter'; or SELECT name FROM myTable WHERE name='reteP';

0
голосов
1ответов
1981 просмотров

Gridview edit column position

I would like to know how to change the edit column position after setting AutoGenerateEditButton="true". By default it is displayed always on the left as the 1st column.

6
голосов
3ответов
6954 просмотров

Should I rebuild table indexes after a SQL Server 2000 to 2005 database migration

I'm tasked with doing a SQL Server 2000 to 2005 migration. I will be doing a side-by-side migration. After restoring from a backup I plan to do the following: ALTER DATABASE <database_name> SET COMPATIBILITY_LEVEL = 90; DBCC CHECKDB(<database_name>) WITH NO_INFOMSGS DBCC UPDATEUSA...

0
голосов
4ответов
1295 просмотров

SQL Server: Compare Index Performance

How can I compare the performance of an Index on a table using the Query Analyzer? I would like to run the same query through the Estimated Execution Plan twice, once using the index and once without, and have a good comparison of the table scans/index scans that are generated. I have tried CRE...

12
голосов
4ответов
4735 просмотров

Does mysql 5.0 index null values?

I realize that the exact question has been asked before on stack overflow with only a vaguely conclusive answer: link So here it is again. Table A: Has an integer column which is nullable, along with an index. Query: SELECT * FROM table WHERE column IS NULL LIMIT 10; Will an index be use...

3
голосов
2ответов
10910 просмотров

jquery getting last input field index

I have a number of "sets" of input fields on page, like this: <div id="allthesets"> <div> <input name="po-3" type="text"> <input name="ba-3" type="text"> </div> <div> <input name="po-9" type="text"> <input name="ba-9...

3
голосов
3ответов
3092 просмотров

SQL Server: Indexing date column in a log table

Example table: CREATE TABLE Log ( logID int identity logDate datetime logText varchar(42) ) logID is already indexed because it is a primary key, but if you were to query this table you would likely want to use logDate as a constraint. However, both logID and logDate are going...

50
голосов
14ответов
289679 просмотров

How to find the index of an element in an array in Java?

I am looking to find the index of a given element, knowing its contents, in Java. I tried the following example, which does not work: class masi { public static void main( String[] args ) { char[] list = {'m', 'e', 'y'}; // should print 1 System.out.println(list[]...

14
голосов
5ответов
10212 просмотров

How to use MySQL index columns?

When do you use each MySQL index type? PRIMARY - Primary key columns? UNIQUE - Foreign keys? INDEX - ?? For really large tables, do indexed columns improve performance?

1
голосов
2ответов
588 просмотров

Indexing a set of key pair values for use in J2ME Application

I have some 1000 key-pair values that I will use in my j2me application, reading it from a resource file. However I will be using only a few of those values at any time, say 10, based on the record number being generated inside the application logic. Loading all the values into memory and then lo...

0
голосов
1ответов
1242 просмотров

Why are overflow blocks in a database not binary searchable?

This is related to primary database indexing mechanism (sparse indexing). Binary search can be used on the index file to locate an entry. But, if overflow blocks have been used, binary search will not be possible. Could someone explain how overflow blocks make binary search not possible to u...

1
голосов
2ответов
1300 просмотров

database index and memory usage

suppose I have a table that stores 100 million records of strings of varying sizes up to 20 characters in a column field. I need to index this column, I only have a 2GB-Ram machine, is this sufficient to perform such task? Is mysql recommended db engine for storage?

15
голосов
4ответов
9035 просмотров

Grails multi column indexes

Can someone explain how to define multi column indexes in Grails? The documentation is at best sparse. This for example does not seem to work at all: http://grails.org/GORM+Index+definitions I've had some luck with this, but the results seems random at best. Definitions that works in one domain...

76
голосов
28ответов
49494 просмотров

Are there other common "c-like" or non "c-like" languages with non zero index array position?

C programming language is known as a zero index array language. The first item in an array is accessible using 0. For example double arr[2] = {1.5,2.5} The first item in array arr is at position 0. arr[0] === 1.5 What programming languages are 1 based indexes? I've heard of the these languages ...

8
голосов
3ответов
7336 просмотров

Turn off indexing on netbeans

I use Netbeans mainly for PHP. When Netbeans starts, it always indexes all the files of all the projects I have on my list. This can take over half an hour in my case, since I have some very large websites open. It got better in 6.7, 10 minutes at most, but still a waste of time. Still, I'd li...

11
голосов
8ответов
4675 просмотров

Is there a way to prevent Googlebot from indexing certain parts of a page?

Is it possible to fine-tune directives to Google to such an extent that it will ignore part of a page, yet still index the rest? There are a couple of different issues we've come across which would be helped by this, such as: RSS feed/news ticker-type text on a page displaying content from an ...

2
голосов
2ответов
541 просмотров

MySQL ignores my index

I'm quite new to setting indexes myself. I'm currently just experimenting with it to discover how it works and in what cases a database will make use of the index. I've got a simple table with 3 columns; an id, a name and a status. I've set an index on the name which is a CHAR(30) column. Agains...

11
голосов
10ответов
11022 просмотров

SQL Server doesn't use index in stored procedure

I haven't solved this issue by using the stored procedure, yet we've decided to surpass the SP and just execute the plain ol' SQL Please see the extended table scheme below Edit 2: Updated the index (to not use actieGroep anymore) NB. SQL Server 2005 Enterprise 9.00.4035.00 NB2. Seems related to...

29
голосов
5ответов
48122 просмотров

Finding index of element in a list in Haskell?

I have a function in Haskell which finds the maximum value of an exponentiation from a list: prob99 = maximum $ map (\xs -> (head xs)^(head (tail xs))) numbers What I need to find is the location of this maximum value in the resultant list. How would I go about this? Edit: I found a soluti...

1
голосов
1ответов
313 просмотров

What is the best Field Type/Encoding to store a number in a Zend Lucene Search Index?

How would I index a price int field in a Zend Lucene Search Index? I am currently using: $doc->addField(Zend_Search_Lucene_Field::Keyword('price', $price, 'utf-8')); Is this the correct way? Or should I be storing it specifically as a number somehow?

2
голосов
1ответов
686 просмотров

Move login controls to home page

I would like to have the login interface on my home page for ASP.NET MVC. I have tried creating a partial view inside of the ~/Views/Account/ directory named LogOn.ascx. But when I try to submit the values via the submit button, everything blows up. Am I missing something or is there an easier wa...

1
голосов
1ответов
263 просмотров

multi-column or one column per index?

How do you create MySQL index? Multi-column or one column per index? What's your thinking?

0
голосов
1ответов
1181 просмотров

Custom UITableView Index Headers on iPhone

I've seen apps that take the UITableView index header (i.e. the thing in the iPod application that separates songs starting in A, B, etc.) and put their own custom image as the background. Such apps are the myStarbucks app and the What's on TV? app. I've looked a little bit through the documentat...

6
голосов
5ответов
272 просмотров

pythonic format for indices

I am after a string format to efficiently represent a set of indices. For example "1-3,6,8-10,16" would produce [1,2,3,6,8,9,10,16] Ideally I would also be able to represent infinite sequences. Is there an existing standard way of doing this? Or a good library? Or can you propose your own for...