Re: Index question

2011-10-12 Thread Johan De Meersman
- Original Message - > From: "Tompkins Neil" > Thanks for the information. One final question in what ways should we > use EXPLAIN EXTENDED statement to help improve our query > performance. Explain is your friend. You should listen to it :-) It gives a nice idea of how the database i

Re: Index question

2011-10-11 Thread Tompkins Neil
Thanks for the information. One final question in what ways should we use EXPLAIN EXTENDED statement to help improve our query performance. On Tue, Oct 11, 2011 at 2:51 PM, Johan De Meersman wrote: > - Original Message - > > From: "Rik Wasmus" > > > > Depends on the data and usage, but

Re: Index question

2011-10-11 Thread Johan De Meersman
- Original Message - > From: "Rik Wasmus" > > Depends on the data and usage, but probably I'd go for a index(a,b) & > index(b,a) if reads heavily outnumber writes. As index(a) is covered > by index(a,b), and index(b) by index(b,a), we don't need to add those, > which saves time on modifi

Re: Index question

2011-10-11 Thread Rik Wasmus
> In this instance would you create four indexes key(a) key(b) key(a,b) key > (b,a) ? Or is the decision based on the query response time ? Depends on the data and usage, but probably I'd go for a index(a,b) & index(b,a) if reads heavily outnumber writes. As index(a) is covered by index(a,b), a

Re: Index question

2011-10-11 Thread Neil Tompkins
In this instance would you create four indexes key(a) key(b) key(a,b) key (b,a) ? Or is the decision based on the query response time ? On 11 Oct 2011, at 13:40, Rik Wasmus wrote: >> Next question. If you have the two separate indexes and then do two >> queries, one for a and one for b. If you

Re: Index question

2011-10-11 Thread Rik Wasmus
> Next question. If you have the two separate indexes and then do two > queries, one for a and one for b. If you then get a list of unique id's > of both, would it be faster to create an intersection yourself rather > than have the server do the legwork? If you only have 2 unrelated indexes on a &

Re: Index question

2011-10-11 Thread Alex Schaft
On 2011/10/11 02:30 PM, Alex Schaft wrote: On 2011/10/11 02:22 PM, Rik Wasmus wrote: Just to clarify having key indexes of (a,b) or (b,a) have no difference ? They DO. See it as lookup table which starts with 'a' in the first case, and 'b' in the second one. Looking for anything that matches

Re: Index question

2011-10-11 Thread Alex Schaft
On 2011/10/11 02:22 PM, Rik Wasmus wrote: Just to clarify having key indexes of (a,b) or (b,a) have no difference ? They DO. See it as lookup table which starts with 'a' in the first case, and 'b' in the second one. Looking for anything that matches 'b' for an index (a,b) requires a full scan

Re: Index question

2011-10-11 Thread Rik Wasmus
> Just to clarify having key indexes of (a,b) or (b,a) have no difference ? They DO. See it as lookup table which starts with 'a' in the first case, and 'b' in the second one. Looking for anything that matches 'b' for an index (a,b) requires a full scan as you don't know 'a', likewise searchin

Re: Index question

2011-10-11 Thread Arthur Fuller
The difference is based on the relative frequency of queries where a is important vs. where b is important. Either way, what will happen is that the index scan will isolate the first item mentioned, then scan the result set to isolate the second term. e.g. SELECT * FROM someTable WERE a = someVal

Re: Index question

2011-10-11 Thread Neil Tompkins
Just to clarify having key indexes of (a,b) or (b,a) have no difference ? On 11 Oct 2011, at 09:36, Johan De Meersman wrote: > - Original Message - >> From: "Alex Schaft" >> >> If you have a table with columns A & B, and might do a where on A or >> B, or an order by A, B, would single

Re: Index question

2011-10-11 Thread Johan De Meersman
- Original Message - > From: "Alex Schaft" > > If you have a table with columns A & B, and might do a where on A or > B, or an order by A, B, would single column indexes on A and B suffice > or would performance on the order by query be improved by an index on > A,B? Depends on usage :-)

Index question

2011-10-11 Thread Alex Schaft
If you have a table with columns A & B, and might do a where on A or B, or an order by A, B, would single column indexes on A and B suffice or would performance on the order by query be improved by an index on A,B? Thanks -- MySQL General Mailing List For list archives: http://lists.mysql.co

[Q] FULLTEXT index question

2008-12-02 Thread Little, Timothy
Can one make a composite index with FULLTEXT for one column and standard indexing on another? For instance we have a table CREATE TABLE OurData ( TheText TEXT, TheLanguageID INTEGER ); We have a FULLTEXT index on TheText, but want to be able to do searches on TheText AND TheLanguage

Re: index, unique index question

2007-08-14 Thread Ananda Kumar
artijn/ > Database development questions? Check the forum! > http://www.databasedevelopmentforum.com > > -Noah > > > -Original Message- > From: Kristian Myllymäki [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 14, 2007 3:50 AM > To: Ananda Kumar > Cc: Jame

Re: index, unique index question

2007-08-14 Thread Martijn Tonies
ijn/ Database development questions? Check the forum! http://www.databasedevelopmentforum.com -Noah -Original Message- From: Kristian Myllymäki [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 14, 2007 3:50 AM To: Ananda Kumar Cc: James Tu; MySQL List Subject: Re: index, unique index questi

RE: index, unique index question

2007-08-14 Thread Dowd, Noah
3:50 AM To: Ananda Kumar Cc: James Tu; MySQL List Subject: Re: index, unique index question A composite index on both columns may be used by queries involving either both columns, or the first column in the index. http://dev.mysql.com/doc/refman/5.0/en/multiple-column-indexes.html So, an index

Re: index, unique index question

2007-08-14 Thread Kristian Myllymäki
A composite index on both columns may be used by queries involving either both columns, or the first column in the index. http://dev.mysql.com/doc/refman/5.0/en/multiple-column-indexes.html So, an index on (receiver_id, sender_id) may be used by predicates on both columns or receiver_id al

Re: index, unique index question

2007-08-13 Thread Ananda Kumar
Hi James, Since your queries have both receiver_id and sender_id in the where condition and u want this to be unique, just create one combined unique index on both these columns. Do this at db level will give you much better options, performance, rather than doing at code level, which might involv

index, unique index question

2007-08-13 Thread James Tu
I have a table that has a Primary key using the 'id' column. The table also has a 'receiver_id' and a 'sender_id'. I have queries that will use (1) "WHERE receiver_id =" or (2) "WHERE sender_id=" but never "WHERE receiver_id='###' AND sender_id='###'" Also, I want the receiver_id/sender_id pair

Re: index question

2007-06-21 Thread Rolando Edwards
where A.col1=B.col1; again See what the explain plan says afterwards. Give it a try !!! - Original Message - From: "John Mancuso" <[EMAIL PROTECTED]> To: mysql@lists.mysql.com Sent: Thursday, June 21, 2007 10:07:39 AM (GMT-0500) America/New_York Subject: index question I

Re: index question

2007-06-21 Thread Gerald L. Clark
John Mancuso wrote: If I have 2 large tables A and B and I need to join them: select * from A,B where A.col1=B.col1 If A.col1 is an index and B.col1 is not, if I create an index on B.col1 will this index be used? In other words how are indexes used on table joins? Thanks John Mancuso Li

index question

2007-06-21 Thread John Mancuso
If I have 2 large tables A and B and I need to join them: select * from A,B where A.col1=B.col1 If A.col1 is an index and B.col1 is not, if I create an index on B.col1 will this index be used? In other words how are indexes used on table joins? Thanks John Mancuso Linux Administrator/MySQL

Re: date index question

2005-12-21 Thread Gleb Paharenko
Hello. Add composite index (tValidFrom, tValidTo) and use constant or variable instead of now(). Force MySQL to use this composite index. Mattias Håkansson wrote: > Hello People, > > I have some indexing problem on using the fieldtype 'date' as > restriction in a query. > I use MySQL

date index question

2005-12-20 Thread Mattias Håkansson
Hello People, I have some indexing problem on using the fieldtype 'date' as restriction in a query. I use MySQL Server version: 4.0.20 The table I have consists of roughly over 200.000 rows about 37 fields and it looks sort of like this: mysql> desc the_table; ++--

Index question

2005-07-11 Thread Emmett Bishop
Howdy all, I've noticed some strange behavior with the way that mysql is choosing indexes with a particular query I'm trying to optimize. First off, I'm using MySQL 4.0.24 on MAC OSX. I've got a table that I'm searching on based upon a set of preferences. From one query to the next the set of pr

Re: Index Question in MyISAM

2005-05-16 Thread Alec . Cawley
Dan Salzer <[EMAIL PROTECTED]> wrote on 16/05/2005 14:36:41: > I have the following table: > > > CREATE TABLE `Article_Search` ( > > `ArticleID` int(11) NOT NULL default '0', > > `Content` text NOT NULL, > > PRIMARY KEY (`ArticleID`), > > FULLTEXT KEY `Content` (`Content`) > > ) ENGINE=MyISAM DE

Index Question in MyISAM

2005-05-16 Thread Dan Salzer
I have the following table: > CREATE TABLE `Article_Search` ( > `ArticleID` int(11) NOT NULL default '0', > `Content` text NOT NULL, > PRIMARY KEY (`ArticleID`), > FULLTEXT KEY `Content` (`Content`) > ) ENGINE=MyISAM DEFAULT CHARSET=latin1 This table has several million rows, but I only want t

Re: B-tree index question

2004-10-21 Thread Sergei Golubchik
Hi! On Oct 21, Phil Bitis wrote: > >From: "Sergei Golubchik" <[EMAIL PROTECTED]> > > > >But for auto_increment field (on BIGINT, I believe ?), > >you'll have hundreds of keys on one key page, so logarithm base will be > >few hundreds, and log N should be just 3-5. That is, it should be only > >~3-

Re: B-tree index question

2004-10-21 Thread Sergei Golubchik
Hi! On Oct 21, Mads Kristensen wrote: > *snip* > > Yes. > > B-tree is always balanced: http://www.nist.gov/dads/HTML/btree.html > > > > Regards, > > Sergei > *snip* > > You are right, B+Trees are always balanced but When you insert in > increasing order all your inserts will be to the last l

Re: B-tree index question

2004-10-21 Thread Phil Bitis
;Gary Richardson" <[EMAIL PROTECTED]> To: "Phil Bitis" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, October 21, 2004 2:45 AM Subject: Re: B-tree index question If you are using MyISAM tables, have you thought about using MERGE tables instead? You could

Re: B-tree index question

2004-10-21 Thread Phil Bitis
From: "Sergei Golubchik" <[EMAIL PROTECTED]> But for auto_increment field (on BIGINT, I believe ?), you'll have hundreds of keys on one key page, so logarithm base will be few hundreds, and log N should be just 3-5. That is, it should be only ~3-5 times slower as compared to the table with one hund

Re: B-tree index question

2004-10-21 Thread Mads Kristensen
*snip* > Yes. > B-tree is always balanced: http://www.nist.gov/dads/HTML/btree.html > > Regards, > Sergei *snip* You are right, B+Trees are always balanced but When you insert in increasing order all your inserts will be to the last leaf of the B+tree. This means that you can get some concurr

Re: B-tree index question

2004-10-20 Thread Gary Richardson
If you are using MyISAM tables, have you thought about using MERGE tables instead? You could partition your table into several smaller tables. I don't know how the performance would be on a billion record table, but from my understanding it would shrink your index down. http://dev.mysql.com/doc/my

Re: B-tree index question

2004-10-20 Thread Phil Bitis
ssage - From: "Sergei Golubchik" <[EMAIL PROTECTED]> To: "Phil Bitis" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, October 20, 2004 9:23 AM Subject: Re: B-tree index question Hi! On Oct 23, Phil Bitis wrote: Hello, We want to be able to inser

Re: B-tree index question

2004-10-20 Thread Phil Bitis
es of indexes, including primary keys? - Original Message - From: "mos" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, October 20, 2004 4:20 AM Subject: Re: B-tree index question Phil, The fastest method to load data into a table is to use "Loa

Re: B-tree index question

2004-10-20 Thread Sergei Golubchik
Hi! On Oct 23, Phil Bitis wrote: > Hello, > > We want to be able to insert records into a table containing a billion > records in a timely fashion. > The table has one primary key, which I understand is implemented using > B-trees, causing insertion to slow by log N. Corect. But for auto_increme

Re: B-tree index question

2004-10-19 Thread mos
At 04:15 PM 10/23/2004, you wrote: Hello, We want to be able to insert records into a table containing a billion records in a timely fashion. The table has one primary key, which I understand is implemented using B-trees, causing insertion to slow by log N. The key field is an auto_increment fiel

B-tree index question

2004-10-19 Thread Phil Bitis
Hello, We want to be able to insert records into a table containing a billion records in a timely fashion. The table has one primary key, which I understand is implemented using B-trees, causing insertion to slow by log N. The key field is an auto_increment field. The table is never joined to ot

Index Question

2004-04-24 Thread jeff . gunther
Hello, I'm trying to create some summary data using some existing InnoDB tables and I'm running into performance issues. Here is the query: select topicx, count(*) from BillVote t1 left join BillVotestudentRelation t3 on t1.mvcoid=t3.idstudent_p left join Student t2 on t3.idstudent_c=t2.mvcoi

Re: index question part 2

2004-02-06 Thread Egor Egorov
rmck <[EMAIL PROTECTED]> wrote: > I understand that I need to update the db's cardinality for this table > > > I need speed > Should I run CHECK TABLE or ANALYZE TABLE or myismachk -a?? I need the quickest one > because with 56179085 records this could take a while... > myisamchk -a

index question part 2

2004-02-04 Thread rmck
ssage- From: rmck <[EMAIL PROTECTED]> Sent: Feb 4, 2004 7:33 AM To: [EMAIL PROTECTED] Subject: index question I ran an insert..select from one table to the other ( changed some column types to int from varchar on new table). the insert went fine. mysql> INSERT INTO Feb04_int SELECT

Re: index question

2004-02-04 Thread vpendleton
Did you run an ANALYZE TABLE? >>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<< On 2/4/04, 9:33:30 AM, rmck <[EMAIL PROTECTED]> wrote regarding index question: > I ra

Re: index question

2004-02-04 Thread Jigal van Hemert
- Original Message - From: "rmck" <[EMAIL PROTECTED]> > Are my indexes all gone?? If so how do I recover them! Thanks hehe ;-) MySQL just doesn't know the cardinality of the indexes yet (the cardinality number is a *guess*) Try CHECK TABLE and I think you will see the cardinality num

Re: index question

2004-02-04 Thread Jigal van Hemert
- Original Message - From: "rmck" <[EMAIL PROTECTED]> > Are my indexes all gone?? If so how do I recover them! Thanks hehe ;-) MySQL just doesn't know the cardinality of the indexes yet (the cardinality number is a *guess*) Try CHECK TABLE and I think you will see the cardinality num

index question

2004-02-04 Thread rmck
I ran an insert..select from one table to the other ( changed some column types to int from varchar on new table). the insert went fine. mysql> INSERT INTO Feb04_int SELECT * from Feb04; Query O

Re: Index Question

2003-11-15 Thread Egor Egorov
"John Berman" <[EMAIL PROTECTED]> wrote: > > Hi. using MYSql 3.28 There is no such version of MySQL :) > > I have a surname column with a standard index and this is the column > were search are performed on, currently the filed only has the one name > i.e.: > > Surname: smith > > I want to in

Index Question

2003-11-12 Thread John Berman
Hi. using MYSql 3.28 I have a surname column with a standard index and this is the column were search are performed on, currently the filed only has the one name i.e.: Surname: smith I want to include other column data in the search i.e. fathersname, so I create an index on that column and

Re: index question

2003-07-10 Thread Victoria Reznichenko
Lists - Jump <[EMAIL PROTECTED]> wrote: > Ok, don't shoot me for not entirely understanding indexes. > > Can you build an index across two different tables w/in the same > database? I need an index on fields in table a and in table b and I > want that index to exist in table a. Is it possible? I

index question

2003-07-10 Thread Lists - Jump
Ok, don't shoot me for not entirely understanding indexes. Can you build an index across two different tables w/in the same database? I need an index on fields in table a and in table b and I want that index to exist in table a. Is it possible? I'm running 4.0.12. TIA, Charlie -- MySQL Genera

Re: index question

2003-06-13 Thread Tom Dangler
[EMAIL PROTECTED]> To: "MySQL ML" <[EMAIL PROTECTED]> Sent: Friday, June 13, 2003 17:21 Subject: index question > > Hello Guys, > > I have the following table: > > CREATE TABLE tempo_resposta ( > id int(11) NOT NULL auto_increment, > idmaquin

Re: index question

2003-06-13 Thread Dobromir Velev
ROTECTED]> Sent: Friday, June 13, 2003 17:21 Subject: index question > > Hello Guys, > > I have the following table: > > CREATE TABLE tempo_resposta ( > id int(11) NOT NULL auto_increment, > idmaquina int(11) NOT NULL default '0', > tempo int(11)

index question

2003-06-13 Thread Leonardo Rodrigues Magalhães
Hello Guys, I have the following table: CREATE TABLE tempo_resposta ( id int(11) NOT NULL auto_increment, idmaquina int(11) NOT NULL default '0', tempo int(11) NOT NULL default '0', horario datetime NOT NULL default '-00-00 00:00:00', PRIMARY KEY (id) ) TYPE=MyISAM; I

Re: index question

2002-11-06 Thread Paul DuBois
At 1:19 -0600 11/6/02, D. Walton wrote: At 01:05 AM 11/6/2002 -0600, you wrote: Paul, the point was to have 'value' be part of the primary key for pure lookup speed (data file would not need be referenced), but not to have it effect the uniqueness of the 'id'/'date' key pair so that I could do

Re: index question

2002-11-05 Thread D. Walton
At 01:05 AM 11/6/2002 -0600, you wrote: Paul, the point was to have 'value' be part of the primary key for pure lookup speed (data file would not need be referenced), but not to have it effect the uniqueness of the 'id'/'date' key pair so that I could do an 'insert ignore' into the table with a

Re: index question

2002-11-05 Thread Paul DuBois
At 23:31 -0600 11/5/02, D. Walton wrote: At 10:32 PM 11/5/2002 -0600, you wrote: At 20:39 -0600 11/5/02, D. Walton wrote: At 05:18 PM 11/5/2002 -0800, you wrote: On Tue, Nov 05, 2002 at 07:14:25PM -0600, D. Walton wrote: I have a table with 3 fields, 'id', 'date', and 'value'. I've created

Re: index question

2002-11-05 Thread D. Walton
At 10:32 PM 11/5/2002 -0600, you wrote: At 20:39 -0600 11/5/02, D. Walton wrote: At 05:18 PM 11/5/2002 -0800, you wrote: On Tue, Nov 05, 2002 at 07:14:25PM -0600, D. Walton wrote: I have a table with 3 fields, 'id', 'date', and 'value'. I've created a unique index on 'id' and 'date' in orde

Re: index question

2002-11-05 Thread Paul DuBois
At 20:39 -0600 11/5/02, D. Walton wrote: At 05:18 PM 11/5/2002 -0800, you wrote: On Tue, Nov 05, 2002 at 07:14:25PM -0600, D. Walton wrote: I have a table with 3 fields, 'id', 'date', and 'value'. I've created a unique index on 'id' and 'date' in order to lookup 'value' quickly. I would li

Re: index question

2002-11-05 Thread D. Walton
At 05:18 PM 11/5/2002 -0800, you wrote: On Tue, Nov 05, 2002 at 07:14:25PM -0600, D. Walton wrote: > > I have a table with 3 fields, 'id', 'date', and 'value'. I've created a > unique index on 'id' and 'date' in order to lookup 'value' quickly. I > would like to be able to add 'value' to the in

Re: index question

2002-11-05 Thread Jeremy Zawodny
On Tue, Nov 05, 2002 at 07:14:25PM -0600, D. Walton wrote: > > I have a table with 3 fields, 'id', 'date', and 'value'. I've created a > unique index on 'id' and 'date' in order to lookup 'value' quickly. I > would like to be able to add 'value' to the index so that the data files > does not

index question

2002-11-05 Thread D. Walton
I have a table with 3 fields, 'id', 'date', and 'value'. I've created a unique index on 'id' and 'date' in order to lookup 'value' quickly. I would like to be able to add 'value' to the index so that the data files does not have to be referenced and will allow faster lookups and groupings by

Re: Newbie Index Question

2002-07-26 Thread Benjamin Pflugmann
Hi. On Fri 2002-07-26 at 08:34:51 -0400, [EMAIL PROTECTED] wrote: [...] > set the dates up as DATETIME fields. However, indexing on these forces me to > specify a date and time or a range. i.e. > > where ReceivedDate = '2002-07-26 08:15:05' > > or > > where ReceivedDate >= '2002-07-26' and Rec

Newbie Index Question

2002-07-26 Thread Darrell A. Sullivan, II
I have just begun "playing around" with MySQL and I have a question about indexing on dates. Part of our system is a work flow management system and we have a table for all documents that we receive. Each document record has several dates to indicate when various processing functions have been co

Re: mysql index question

2002-05-16 Thread Egor Egorov
Taylor, Thursday, May 16, 2002, 4:22:37 PM, you wrote: TL> Regarding mysql... TL> 1) Are primary keys and foreign keys by default indexes for a table? Yeah. Primary key is index by default. Foreign key constraints you can create only on indexed column. TL> 2) Do I have to use a special data oth

Re: mysql index question

2002-05-16 Thread Nick Stuart
>From my understanding primary keys and foreign keys are indexed. Someone correct me if I'mwrong here. And you shouldn't have to do anything else to field besides make it a float to usenegative numbers. -Nick > Regarding mysql... > 1) Are primary keys and foreign keys by default indexes for a t

mysql index question

2002-05-16 Thread Taylor Lewick
Regarding mysql... 1) Are primary keys and foreign keys by default indexes for a table? 2) Do I have to use a special data other than float to allow for negative numbers, i.e. I want to be able to enter -1.76 and be able to later do math against that number... Thanks, Taylor Taylor Lewick U

Re: FULLTEXT index question

2002-04-15 Thread Sergei Golubchik
Hi! On Apr 15, Nicholas Murphy wrote: > > The query > > select * from tablename where match(column_name) > against('three'); > > fails to match any record. > > Ten to twelve records in the table are know to have > the distinct word "three" in them in the indexed column. > > Question: > >

FULLTEXT index question

2002-04-15 Thread Nicholas Murphy
Environment: MySQL Version 3.23.42 FreeBSD 4.4 ISAM table of about 300,000 rows and 10 columns with a column structured as varchar(50) upon which exists a FULLTEXT index Behavior: The query select * from tablename where match(column_name) against('tree'); selects seven records. The query

Re: [Newbie] MATCH and INDEX question (using a JOIN in a MATCH statement)

2002-03-28 Thread Dan Tappin
Well after some pondering I found a pretty easy work around: SELECT main.id, description, maincat.name, subcat.name from main LEFT JOIN maincat ON maincat.id=main.maincatid LEFT JOIN subcat ON subcat.id=main.subcatid WHERE MATCH (description) AGAINST ('keywords') OR WHERE MATCH (maincat.name) AGA

Re: [Newbie] MATCH and INDEX question (using a JOIN in a MATCH statement)

2002-03-27 Thread Dan Tappin
Thanks Paul, I figured that was the answer. Do I need to perform a second and third query from my related tables with a join back to the 'main' table? Example: select main.id, main.description, maincat.name, subcat.name from main LEFT JOIN maincat ON main.maincatid=maincat.id LEFT JOIN subcat

Re: [Newbie] MATCH and INDEX question (using a JOIN in a MATCH statement)

2002-03-26 Thread Paul DuBois
At 13:43 -0700 3/26/02, Dan Tappin wrote: >This is a follow-up to a MySQL keyword text search question I had answer a >few days ago. > >I have table 'main' which has two INT columns 'maincat' and 'subcat' which >hold an index number from to other tables maincat and subcat. These table >each hold

[Newbie] MATCH and INDEX question (using a JOIN in a MATCHstatement)

2002-03-26 Thread Dan Tappin
This is a follow-up to a MySQL keyword text search question I had answer a few days ago. I have table 'main' which has two INT columns 'maincat' and 'subcat' which hold an index number from to other tables maincat and subcat. These table each hold descriptive names ('name') for each of the main

index question strange behavior

2001-11-27 Thread rick herbel
Questions about index mysql> show index from listing; +-++-+--+-+- --+-+--+ | Table | Non_unique | Key_name| Seq_in_index | Column_name | Collation | Cardinality | Sub_part | +-++

Re: Index Question

2001-09-10 Thread Paul DuBois
>Hello All, > >I've got a question that is likely an easy one, I just want confirmation from >my peers. > >I have tables with a timestamp column and perform many selects and counts from >these tables based on the date that the record was written. > >Can/should I index a timestamp column? I do my b

Re: Index Question

2001-09-10 Thread Rodney Broom
From: <[EMAIL PROTECTED]> > Can/should I index a timestamp column? Can: Yes. Should: Why not? > Should I treat it as a char and > limit it to just index on the portion of the data that distinguishes the date Hmm, I wouldn't. Offhand, I'd guess that MySQL handles time/date things as integers

Index Question

2001-09-10 Thread t_mills
Hello All, I've got a question that is likely an easy one, I just want confirmation from my peers. I have tables with a timestamp column and perform many selects and counts from these tables based on the date that the record was written. Can/should I index a timestamp column? I do my best to i

Re: Another index question

2001-05-25 Thread Marc Delisle
Did you try EXPLAIN before SELECT? http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#EXPLAIN Mike Baranski a écrit : > > For the following select: > > SELECT DISTINCT badge_history.xact_date AS xact_date, (...) -- Marc Delisle Service de l'

Another index question

2001-05-25 Thread Mike Baranski
For the following select: SELECT DISTINCT badge_history.xact_date AS xact_date, badge_history.xact_time AS xact_time, badge_history.last_name AS last_name, badge_history.bid AS bid, badgests.cond_desc AS status, department.description AS department, badge_history.reader_desc AS reader_desc, area.

Re: Database Index Question

2001-04-26 Thread Steve Edberg
At 9:31 AM -0700 4/26/01, Shane Gentry wrote: > Does it help to put an Index on a column when you > use a LIKE query. > > ex. SELECT * FROM users WHERE name LIKE '%tom%' > > Thanks in Advance! > In this case, It won't help, since you have a wildcard at the beginning of your pattern. If you u

Database Index Question

2001-04-26 Thread Shane Gentry
Does it help to put an Index on a column when you use a LIKE query. ex. SELECT * FROM users WHERE name LIKE '%tom%' Thanks in Advance! __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/

Index Question

2001-03-01 Thread Daren Cotter
My question is about indexes...basically, I'm wondering how many indexes is too much, and what the drawbacks are of having more indexes on a table? I'm guessing INSERT and UPDATE queries probably take longer? My table has the following fields: member_id, first_name, last_name, username, password

Re: Index Question(again).

2001-02-19 Thread Gerald L. Clark
In the first query, mysqld could get all the information it needed from table a from the index file. In the second query, it needed to read the data file to get all the columns, and determined that using an index would not gain any speed. From the 3 reow returned, I woul guess that you don't hav

RE: Index Question(again).

2001-02-19 Thread Quentin Bennett
0 February 2001 07:30 To: MySQL Maillin List Subject: Index Question(again). No Body answered my previous mail. plz help me. I have three tables. i) student_info3 i) grade_ex3 i) test_info and, There are those Index In student_info3 table : index(student_no) In grade_ex3 table : index(student_n

Index Question(again).

2001-02-19 Thread 허정수
No Body answered my previous mail. plz help me. I have three tables. i) student_info3 i) grade_ex3 i) test_info and, There are those Index In student_info3 table : index(student_no) In grade_ex3 table : index(student_no, test_no) In test_info table : index(test_no) When I use t

Index question

2001-02-18 Thread 허정수
Hi~ All. I have a question about using index. I have two following tables. mysql> explain ex1 ; +---+--+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +---+--+--+-+-+---+ | a | char(10) | YES | MUL |

RE: Index question

2001-01-24 Thread Patrick FICHE
lumns)... Patrick -Message d'origine- De : Don [mailto:[EMAIL PROTECTED]] Envoyé : mercredi 24 janvier 2001 15:45 À : msql list Objet : Index question Say I have a table called Discharge that is indexed on Vessel + Voyage + Port (Primary Key). It has thousands of records in it and co

Index question

2001-01-24 Thread Don
Say I have a table called Discharge that is indexed on Vessel + Voyage + Port (Primary Key). It has thousands of records in it and continuously grows. I now want to delete records where Vessel = "USS ENTERPRISE" Voyage = "005" I want to delete all records with the above Vessel/Voyage. There c

index question

2001-01-23 Thread Taavi Kald
Hi! I have a table "uudised": NewsID int(11) PRI auto_increment Pealkirivarchar(250)YES Uudis textYES DatedatetimeYES MUL EditorIDint(11) YES KategID int(11) YES MUL Autor varchar(50) YES AllikasID