Re: indexing on column having duplicate values

2014-05-28 Thread Reindl Harald
Am 28.05.2014 22:39, schrieb Rajeev Prasad: > (re-sending, i got err from yahoo) your previous message made it off-list to me *don't use reply-all on mailing lists* signature.asc Description: OpenPGP digital signature

Re: indexing on column having duplicate values

2014-05-28 Thread Rajeev Prasad
(re-sending, i got err from yahoo) thx Reindl, I am using phpMyAdmin, i looked closely and found "index" is this index you are talking about? (earlier i used "Primary"). My further question is: the index key here is going to be epoch system time. I currently have it as integer 10. The table wi

Re: indexing on column having duplicate values

2014-05-28 Thread Reindl Harald
Am 28.05.2014 22:29, schrieb Rajeev Prasad: > I am using phpMyAdmin, i looked closely and found "index" is this index you > are talking about? (earlier i used "Primary"). surely primary is a uniqe key, honestly consider to read some manuals > My further question is: the index key here is goin

Re: indexing on column having duplicate values

2014-05-28 Thread Reindl Harald
Am 28.05.2014 21:43, schrieb Rajeev Prasad: > I am going to have a big table with lot of records, to expedite searching i > wanted to index on a key field (which is numeric value). BUT, there will be > records which will have same value for the key field (other columns will be > different). >

RE: Indexing about 40 Billion Entries

2012-06-21 Thread Rick James
Possibly worse than that, since it will rebuild the 'first' index again. > -Original Message- > From: mos [mailto:mo...@fastmail.fm] > Sent: Thursday, June 21, 2012 7:51 AM > To: mysql@lists.mysql.com > Subject: Re: Indexing about 40 Billion Entries > > A

Re: Indexing about 40 Billion Entries

2012-06-21 Thread Christian Koetteritzsch
Hi, thanks for the hint, I was testing the settings for the myisam_sort_buffer_size so I totally forgot it. But I have another three of these databases to do, so next time I do it with one ALTER statement Christian Am 21.06.2012 16:50, schrieb mos: At 02:04 AM 6/21/2012, you wrote: Thank yo

Re: Indexing about 40 Billion Entries

2012-06-21 Thread mos
At 02:04 AM 6/21/2012, you wrote: Thank you a lot. The first indexing process finished after about 13 hours, so I think the problem is solved now. I set the myisam_sort_bufffer_size to 10GB. The "first indexing process"??? You should have created all of your indexes with one Alter statement.

Re: Indexing about 40 Billion Entries

2012-06-21 Thread Brent Clark
On 20/06/2012 11:45, Christian Koetteritzsch wrote: Hi guys, As the title says I'm trying to index 40 billion entries with two indexes on a server with 16 cores and 128GB RAM. The table is the one below and it is a myisam table. The *.myd file is about 640GB Hiya I am unable to help. But

Re: Indexing about 40 Billion Entries

2012-06-21 Thread Christian Koetteritzsch
where PARTITION shines. (I have not seen such [yet] in your application.) -Original Message- From: Christian Koetteritzsch [mailto:ckoetteritz...@e-humanities.net] Sent: Wednesday, June 20, 2012 1:42 PM To: Rick James Cc: Ananda Kumar; mysql@lists.mysql.com Subject: Re: Indexing about 40

RE: Indexing about 40 Billion Entries

2012-06-20 Thread Rick James
use cases where PARTITION shines. (I have not seen such [yet] in your application.) > -Original Message- > From: Christian Koetteritzsch [mailto:ckoetteritz...@e-humanities.net] > Sent: Wednesday, June 20, 2012 1:42 PM > To: Rick James > Cc: Ananda Kumar; mysql@lists.mysql.co

RE: Indexing about 40 Billion Entries

2012-06-20 Thread Rick James
(ruid1, ruid2) will help for AND, but not at all for OR. > -Original Message- > From: Shawn Green [mailto:shawn.l.gr...@oracle.com] > Sent: Wednesday, June 20, 2012 2:30 PM > To: mysql@lists.mysql.com > Subject: Re: Indexing about 40 Billion Entries > > On 6/20/20

Re: Indexing about 40 Billion Entries

2012-06-20 Thread Shawn Green
On 6/20/2012 5:45 AM, Christian Koetteritzsch wrote: Hi guys, As the title says I'm trying to index 40 billion entries with two indexes on a server with 16 cores and 128GB RAM. The table is the one below and it is a myisam table. The *.myd file is about 640GB DROP TABLE IF EXISTS `l4_link`; CRE

Re: Indexing about 40 Billion Entries

2012-06-20 Thread Christian Koetteritzsch
ul. If you have more questions than you can ask them. Kind regards Christian -Original Message- From: Ananda Kumar [mailto:anan...@gmail.com] Sent: Wednesday, June 20, 2012 4:37 AM To: Christian Koetteritzsch Cc:mysql@lists.mysql.com Subject: Re: Indexing about 40 Billion Entries looks

Re: Indexing about 40 Billion Entries

2012-06-20 Thread Christian Koetteritzsch
in common. I hope the informations I gave you are helpful. If you have more questions than you can ask them. Kind regards Christian -Original Message- From: Ananda Kumar [mailto:anan...@gmail.com] Sent: Wednesday, June 20, 2012 4:37 AM To: Christian Koetteritzsch Cc:mysql@lists.mysql.

RE: Indexing about 40 Billion Entries

2012-06-20 Thread Rick James
static? What are the semantics of the fields? > -Original Message- > From: Ananda Kumar [mailto:anan...@gmail.com] > Sent: Wednesday, June 20, 2012 4:37 AM > To: Christian Koetteritzsch > Cc: mysql@lists.mysql.com > Subject: Re: Indexing about 40 Billion Entries > &g

Re: Indexing about 40 Billion Entries

2012-06-20 Thread Ananda Kumar
looks like the value that you give for myisam_max_sort_size is not enough for the index creation and hence it doing a "REPAIR WITH KEYCACHE" Use the below query to set the min values required for myisam_max_sort_size to avoid "repair with keycache" select a.index_name as index_name,

Re: Indexing question

2010-10-06 Thread Jonas Galvez
Thanks Gavin and Joerg, that was very helpful! -- Jonas On Sun, Oct 3, 2010 at 12:44 PM, Joerg Bruehe wrote: > Hi Neil, all! > > > Tompkins Neil wrote: > > So if you have individual indexes for example field_1, field_2 and > field_3 > > etc and then perform a search like > > > > WHERE field_1 =

Re: Indexing question

2010-10-05 Thread Tompkins Neil
> -Original Message- >> From: Tompkins Neil [mailto:neil.tompk...@googlemail.com] >> Sent: Monday, October 04, 2010 8:54 AM >> To: Joerg Bruehe >> Cc: [MySQL] >> Subject: Re: Indexing question >> >> Jörg >> >> Thanks for the usef

Re: Indexing question

2010-10-04 Thread Neil Tompkins
ssage- From: Tompkins Neil [mailto:neil.tompk...@googlemail.com] Sent: Monday, October 04, 2010 8:54 AM To: Joerg Bruehe Cc: [MySQL] Subject: Re: Indexing question Jörg Thanks for the useful reply. Maybe I can EXPLAIN my select queries for you to advise if any changes need to be made ? Regards

RE: Indexing question

2010-10-04 Thread Gavin Towey
: Re: Indexing question Jörg Thanks for the useful reply. Maybe I can EXPLAIN my select queries for you to advise if any changes need to be made ? Regards Neil On Mon, Oct 4, 2010 at 3:38 PM, Joerg Bruehe wrote: > Hi! > > > Neil Tompkins wrote: > > Thanks for your reply. S

Re: Indexing question

2010-10-04 Thread Tompkins Neil
Jörg Thanks for the useful reply. Maybe I can EXPLAIN my select queries for you to advise if any changes need to be made ? Regards Neil On Mon, Oct 4, 2010 at 3:38 PM, Joerg Bruehe wrote: > Hi! > > > Neil Tompkins wrote: > > Thanks for your reply. So should we create individual indexes on each

Re: Indexing question

2010-10-04 Thread Joerg Bruehe
Hi! Neil Tompkins wrote: > Thanks for your reply. So should we create individual indexes on each > field or a multiple column index ?? This question cannot be answered without checking and measuring your installation. The decision whether to create an index is always an act of balancing: - If t

Re: Indexing question

2010-10-03 Thread Neil Tompkins
Following on from my previous email I have columns containing numbers which are then used in SUM and MIN/ MAX functions should these be indexed too ? On 3 Oct 2010, at 16:44, Joerg Bruehe wrote: Hi Neil, all! Tompkins Neil wrote: So if you have individual indexes for example field_1, fie

Re: Indexing question

2010-10-03 Thread Neil Tompkins
Thanks for your reply. So should we create individual indexes on each field or a multiple column index ?? On 3 Oct 2010, at 16:44, Joerg Bruehe wrote: Hi Neil, all! Tompkins Neil wrote: So if you have individual indexes for example field_1, field_2 and field_3 etc and then perform a s

Re: Indexing question

2010-10-03 Thread Joerg Bruehe
Hi Neil, all! Tompkins Neil wrote: > So if you have individual indexes for example field_1, field_2 and field_3 > etc and then perform a search like > > WHERE field_1 = 10 > AND field_3 = 'abc' > > This wouldn't improve the search ? You have to create a index for all > possible combined field

Re: Indexing question

2010-10-03 Thread Tompkins Neil
So if you have individual indexes for example field_1, field_2 and field_3 etc and then perform a search like WHERE field_1 = 10 AND field_3 = 'abc' This wouldn't improve the search ? You have to create a index for all possible combined field searches ? On Fri, Oct 1, 2010 at 9:35 PM, Gavin T

RE: Indexing question

2010-10-01 Thread Gavin Towey
You can't use an index to select records in a range, and order them. The order by will cause a filesort in that case. Additionally indexes are always read left to right. So an index on ('user_id', 'product_id') will help when doing WHERE user_id=N AND product_id IN (1,2,3), but wouldn't help

Re: Indexing dynamics in MySQL Community Edition 5.1.34

2009-06-27 Thread Todd Lyons
On Sat, Jun 27, 2009 at 7:03 AM, Mike Spreitzer wrote: > Today's instance finished shortly after I sent the email below.  BTW, here > are some specifics on the table (which uses MyISAM).  Thursday's instance > has 11 GB of data and 0.78 GB of index.  Today's instance has 26 GB of > data and 1.8 GB

Re: Indexing dynamics in MySQL Community Edition 5.1.34

2009-06-27 Thread Mike Spreitzer
preitzer/Watson/i...@ibmus 06/27/09 09:48 AM To mos cc mysql@lists.mysql.com Subject Re: Indexing dynamics in MySQL Community Edition 5.1.34 Yes, all the indices are added in one "ALTER TABLE" statement. Thursday's incarnation took about 1.5 hours, on a table created fro

Re: Indexing dynamics in MySQL Community Edition 5.1.34

2009-06-27 Thread Mike Spreitzer
, however, that my key_buffer_size is 8GB. > >That indexing operation finally finished after about 1.5 hours; that was >about 0.5 hours ago. Now I am on to other things. Here is the status you >suggested: > > [SNIP] > >Thanks, >Mike Spreitzer > > > >mos >

Re: Indexing dynamics in MySQL Community Edition 5.1.34

2009-06-27 Thread Simon J Mudd
mo...@fastmail.fm (mos) writes: > At 12:37 AM 6/25/2009, you wrote: ... > >my.cnf based on my-huge.cnf, expanding key_buffer to 8G, > >myisam_sort_buffer_size to 256M, and putting tmpdir on the fiber channel > >disk. > > You mean "key_buffer_size" don't you and not "key_buffer"? If you > a

Re: Indexing? (Warning: relative newbie.)

2009-06-26 Thread Shawn Green
Hi Walter, Walter Heck - OlinData.com wrote: Hey Tim, all On Wed, Jun 24, 2009 at 10:03 AM, Little, Timothy wrote: Why, you might ask, index on physmessage_id? Because then the db won't have to do a fetch on items from the table since it's in the INDEX itself, saving any unnecessary reads. F

RE: Indexing? (Warning: relative newbie.)

2009-06-26 Thread Ken D'Ambrosio
After a few off-list e-mails with Tim, I issued ALTER TABLE dbmail_messageblks ADD INDEX ( blocksize AND physmessage_id ); which took almost 11 hours to index. Once done, however, my select statement went from a hair over 50 minutes to 15 seconds. (1.69 seconds after the index was cached.) Wow

RE: Indexing dynamics in MySQL Community Edition 5.1.34

2009-06-26 Thread Jerry Schwartz
>From: Jerry Schwartz [mailto:jschwa...@the-infoshop.com] >Sent: Friday, June 26, 2009 10:22 AM >To: 'Moon's Father'; 'mos' >Cc: mysql@lists.mysql.com >Subject: RE: Indexing dynamics in MySQL Community Edition 5.1.34 > > > >>-Original Message-

RE: Indexing dynamics in MySQL Community Edition 5.1.34

2009-06-26 Thread Jerry Schwartz
>-Original Message- >From: Moon's Father [mailto:yueliangdao0...@gmail.com] >Sent: Friday, June 26, 2009 4:12 AM >To: mos >Cc: mysql@lists.mysql.com >Subject: Re: Indexing dynamics in MySQL Community Edition 5.1.34 > >Who can please tell me what is mean o

Re: Indexing dynamics in MySQL Community Edition 5.1.34

2009-06-26 Thread Moon's Father
| | >> | Ssl_cipher_list | | >> | Ssl_client_connects | 0 | >> | Ssl_connect_renegotiates | 0 | >> | Ssl_ctx_verify_depth | 0 | >> | Ssl_ctx_verify_mode

Re: Indexing dynamics in MySQL Community Edition 5.1.34

2009-06-25 Thread mos
2 | | Uptime| 6952 | | Uptime_since_flush_status | 6952 | +---+---+ Thanks, Mike Spreitzer mos 06/25/09 02:32 AM To mysql@lists.mysql.com cc Subject Re: Indexing dynamics in MySQL Community Edition 5.1.34

RE: Indexing dynamics in MySQL Community Edition 5.1.34

2009-06-25 Thread Jerry Schwartz
>-Original Message- >From: Mike Spreitzer [mailto:mspre...@us.ibm.com] >Sent: Thursday, June 25, 2009 1:38 AM >To: mysql@lists.mysql.com >Subject: Re: Indexing dynamics in MySQL Community Edition 5.1.34 > >Actually, my characterization of the current state is wrong.

Re: Indexing dynamics in MySQL Community Edition 5.1.34

2009-06-24 Thread mos
At 12:37 AM 6/25/2009, you wrote: Actually, my characterization of the current state is wrong. It appears that one core is completely busy, I suppose MySQL does this indexing work in a single thread. Is it reasonable for indexing to be CPU bound? my.cnf based on my-huge.cnf, expanding key_buf

Re: Indexing dynamics in MySQL Community Edition 5.1.34

2009-06-24 Thread Mike Spreitzer
Actually, my characterization of the current state is wrong. It appears that one core is completely busy, I suppose MySQL does this indexing work in a single thread. Is it reasonable for indexing to be CPU bound? Thanks, Mike Spreitzer Mike Spreitzer/Watson/i...@ibmus 06/25/09 01:30 AM T

Re: Indexing? (Warning: relative newbie.)

2009-06-24 Thread Walter Heck - OlinData.com
Hey Tim, all On Wed, Jun 24, 2009 at 10:03 AM, Little, Timothy wrote: > Why, you might ask, index on physmessage_id?  Because then the db won't > have to do a fetch on items from the table since it's in the INDEX > itself, saving any unnecessary reads. FYI: That only holds true for InnoDB, not for

RE: Indexing? (Warning: relative newbie.)

2009-06-24 Thread Little, Timothy
To answer your questions in no particular order, YES you can speed it up with indexing. You might want to first create an index on ( blocksize AND physmessage_id ). Why, you might ask, index on physmessage_id? Because then the db won't have to do a fetch on items from the table since it's in the

Re: INDEXING ALL COLUMNS

2008-09-05 Thread Krishna Chandra Prajapati
More details. CREATE TABLE mailer_student_status ( student_id decimal(22,0) NOT NULL default '0', param varchar(128) NOT NULL default '', value varchar(128) default NULL, PRIMARY KEY (student_id,param). KEY idx_value (value) ) SELECT VALUE FROM mailer_student_status WHERE student_id

Re: INDEXING ALL COLUMNS

2008-09-05 Thread ewen fortune
Hi, Well at first glance its hard to tell since "param" and "value" don't say a lot about the nature of the data. If this is innodb, you can have a PRIMARY KEY of student_id (assuming its unique) and a separate index on param, this is because of the way innodb is structure, the primary key is alwa

Re: INDEXING ALL COLUMNS

2008-09-05 Thread Aaron Blew
We'd need more information on what the where clauses of the queries look like to assist with this. -Aaron On 9/5/08, Krishna Chandra Prajapati <[EMAIL PROTECTED]> wrote: > Hi, > > What would you say about the below table . What can i do to make it more > efficient. > > CREATE TABLE mailer_student

Re: INDEXING ALL COLUMNS

2008-09-05 Thread Krishna Chandra Prajapati
Hi, What would you say about the below table . What can i do to make it more efficient. CREATE TABLE mailer_student_status ( student_id decimal(22,0) NOT NULL default '0', param varchar(128) NOT NULL default '', value varchar(128) default NULL, PRIMARY KEY (student_id,param). KEY idx_va

Re: INDEXING ALL COLUMNS

2008-09-05 Thread ewen fortune
Hi, Following on from what Mike mentioned, indexing all columns does not really help as MySQL will at most use one index for a query, so its important to pick your indexes carefully and consider constructing composite indexes. An index on a single column may not even be used due to poor cardinalit

Re: INDEXING ALL COLUMNS

2008-09-05 Thread Mike Zupan
As your table grows your inserts will start to get slower and slower. You run into the issue of locking a table due to re-creating the indexes. Also wasted space for indexes On 9/5/08, Krishna Chandra Prajapati <[EMAIL PROTECTED]> wrote: > > Hi all, > > I am looking for, is there any specific re

Re: Indexing question

2008-03-25 Thread J. Christian Hesketh
The field has up to 1000 characters, usually well over 255. It is searched constantly (2-3 times every second). The smallint values are scanned up to 40 times a second. So, are you saying that the entire MYI file is dumped into the keycache? If so, your suggestion to create a separate table with PK

Re: Indexing question

2008-03-25 Thread Arthur Fuller
What is the size of the text field you're fulltext indexing? How often is that index used? You might be best off to create a table containing only that column and a PK that is equal to the PK in the original table. You might also keep a portion of the text field (say 50 characters) in the original

Re: Indexing one byte flags - what implementattion is better

2007-12-28 Thread Artem Kuchin
Garris, Nicole wrote: Is id a sequential number? And is it referenced by other tables? If so, and if over time new products become "old" products, then CASE 2 is more complex, because when moving a product (i.e., a row) from the new product table to the old product table, the value of id needs to

RE: Indexing one byte flags - what implementattion is better

2007-12-27 Thread Garris, Nicole
Is id a sequential number? And is it referenced by other tables? If so, and if over time new products become "old" products, then CASE 2 is more complex, because when moving a product (i.e., a row) from the new product table to the old product table, the value of id needs to stay the same. So for C

Re: indexing tables using my owns functions

2007-11-13 Thread Martijn Tonies
> >, as far as i can see, from mysql 5.0 and upper it is possible create >index using functions. > >http://www.faqs.org/docs/ppbook/r24254.htm > >But i keep having problems with the exemple from the link. Is there any bug >in mysql 5.0.24a-log? The above website says: "Practical PostgreSQL"

Re: indexing tables using my owns functions

2007-11-13 Thread Pau Marc Munoz Torres
, as far as i can see, from mysql 5.0 and upper it is possible create index using functions. http://www.faqs.org/docs/ppbook/r24254.htm But i keep having problems with the exemple from the link. Is there any bug in mysql 5.0.24a-log? 2007/11/13, Martijn Tonies <[EMAIL PROTECTED]>: >mysql>

Re: indexing tables using my owns functions

2007-11-13 Thread Martijn Tonies
>mysql> create index AA on precalc (IDR(P1,P4,P6,P7,P9,'HLA-DRB13')); > >But i Get the following error: > >ERROR 1064 (42000): You have an error in your SQL syntax; check the manual >that corresponds to your MySQL server version for the right syntax to use >near ''P1','P4','P6','P7','P9','HLA-DRB1

Re: indexing order column

2007-05-04 Thread Afan Pasalic
Baron Schwartz wrote: Hi, Afan Pasalic wrote: Baron Schwartz wrote: Hi Afan, Afan Pasalic wrote: hi, if I have column order_id(int(4)) null do I have to index it too. I'm going to use it ONLY for sorting records. It depends a lot on how much data is in the table, etc etc. An index will

Re: indexing order column

2007-05-04 Thread Baron Schwartz
Hi, Afan Pasalic wrote: Baron Schwartz wrote: Hi Afan, Afan Pasalic wrote: hi, if I have column order_id(int(4)) null do I have to index it too. I'm going to use it ONLY for sorting records. It depends a lot on how much data is in the table, etc etc. An index will make sorting more effi

Re: indexing order column

2007-05-04 Thread Afan Pasalic
Baron Schwartz wrote: Hi Afan, Afan Pasalic wrote: hi, if I have column order_id(int(4)) null do I have to index it too. I'm going to use it ONLY for sorting records. It depends a lot on how much data is in the table, etc etc. An index will make sorting more efficient in the general case

Re: indexing order column

2007-05-04 Thread Baron Schwartz
Hi Afan, Afan Pasalic wrote: hi, if I have column order_id(int(4)) null do I have to index it too. I'm going to use it ONLY for sorting records. It depends a lot on how much data is in the table, etc etc. An index will make sorting more efficient in the general case when you have a decent a

Re: Indexing issue in slave !!

2007-01-06 Thread Dan Nelson
In the last episode (Jan 06), Himanshu Raina said: > I am facing a peculiar problem.When i execute a query on slave server > it doesn't use indexes that have been created and hence read all the > records present in that table.The same query when execute on Master > yields proper results.The table s

Re: Indexing and no values

2005-10-03 Thread Gleb Paharenko
Hello. > What's the reason behind this? If you're asking about why I've written that columns defined as NOT NULL are faster - I've read it in one of the articles from dev.mysql.com. I'm not sure about the true reason, but the way MySQL stores NULLs is strongly dependent on the storage engi

Re: Indexing and no values

2005-10-03 Thread Jigal van Hemert
Gleb Paharenko wrote: I'm not giving an exact answer on your question, however, it might be interesting for you. Usually queries are faster if you define the column as NOT NULL. What's the reason behind this? NULL 'values' are a bit of strange phenomenon. In the EXPLAIN output a query with WH

Re: Indexing and no values

2005-10-03 Thread Gleb Paharenko
Hello. I'm not giving an exact answer on your question, however, it might be interesting for you. Usually queries are faster if you define the column as NOT NULL. Lefteris Tsintjelis wrote: > Hi, > > What is better/faster to insert as a value for indexed fields, in case of > 0 or Null

Re: Indexing not working

2005-06-24 Thread SGreen
Sajith A <[EMAIL PROTECTED]> wrote on 06/24/2005 02:07:22 AM: > Thank you Mathias once again > > I suggest you to test after optimize table ... and analyze table ... > > if you stay with the problem and you can give me a set of data, > i'll try to help > > more. > Initially while posting... i

Re: Indexing not working

2005-06-24 Thread gerald_clark
Sajith A wrote: Thank you Clark for your time Try using straight joins to force MySQL to join from qb_test_result first. The order chosen by the optimizer has no use for keys from this table. I tried to force indexes.. but it didn't help Thank you Since the query you supplied cann

Re: Indexing not working

2005-06-23 Thread Sajith A
Thank you Clark for your time > Try using straight joins to force MySQL to join from qb_test_result first. > The order chosen by the optimizer has no use for keys from this table. I tried to force indexes.. but it didn't help Thank you -- MySQL General Mailing List For list archives: http://lists.

Re: Indexing not working

2005-06-23 Thread Sajith A
Thank you Mathias once again > I suggest you to test after optimize table ... and analyze table ... > if you stay with the problem and you can give me a set of data, i'll try to > help > more. Initially while posting... i tried to reduce one table to avoid complexity from the actual query. I'm

Re: Indexing not working

2005-06-23 Thread mfatene
Selon Michael Stassen <[EMAIL PROTECTED]>: > The PK is not used, nor should it be. Look at the EXPLAIN output. Hi, i hate the confusion people do between the primary key and the automatic index on the PK. Primary key is a generic concept for all databases. It assumes unicity and managed data ins

Re: Indexing not working

2005-06-23 Thread Michael Stassen
[EMAIL PROTECTED] wrote: Hi, have you created an index on (id, testId) ? i can't see the other indexes ? The only ones are the PK and testStudent, so the PK is used. The PK is not used, nor should it be. Look at the EXPLAIN output. Let me rewrite the query with explicit joins, and reformat i

Re: Indexing not working

2005-06-23 Thread gerald_clark
Sajith A wrote: EXPLAIN SELECT qb_test_result.id resultId, qb_question.testId AS testId, qb_test.title testName, qb_question.marks, qb_test.passrate, qb_test_result.marks testMark, qb_test_result.percentage testPercentage, qb_test_result.startTime, qb_test_result.endTime, qb_test_result.status

Re: Indexing not working

2005-06-23 Thread mfatene
Hi Sajith, I tried to recreate you tables and do some tests, but i don't have significant data. So i don't take your explain plan. I suggest you to test after optimize table ... and analyze table ... if you stay with the problem and you can give me a set of data, i'll try to help more. Mathias S

Re: Indexing not working

2005-06-23 Thread Sajith A
Thank you Mathias for your time... > have you created an index on (id, testId) ? > i can't see the other indexes ? The only ones are the PK and testStudent, so > the > PK is used. Yes i also tried that .. but it was not getting used.. it listed as the possible_keys "PRIMARY" and "testStudent" but

Re: Indexing not working

2005-06-23 Thread mfatene
Hi, have you created an index on (id, testId) ? i can't see the other indexes ? The only ones are the PK and testStudent, so the PK is used. Mathias Selon Sajith A <[EMAIL PROTECTED]>: > I was trying to analyze a query that was taking almost 4 seconds to > execute. While trying to create additio

Re: Indexing implementation

2005-06-09 Thread Gleb Paharenko
Hello. Here is the answer from Ingo: "It is even worse. The old index stays in place, but will never be used again. ENABLE INDEX creates a new index from scratch. See Bug#4692 - DISABLE/ENABLE KEYS waste a space." roi h <[EMAIL PROTECTED]> wrote: > Hi, > > Another question, to

Re: Indexing Performance Problem

2005-06-08 Thread Brent Baisley
I would increase your myisam_sort_buffer_size considerably just for this operation. You've got your key_buffer set high, but your sort buffer is comparatively low for creating a big index. One way you can tell how far along the index is, is to look at how quickly the index file is growing and

Re: Indexing Questions (Problem?)

2005-02-04 Thread Brad Guillory
Thanks Tom and Michael, I got rid of all of the indexes except the one marked "PRIMARY" and a new one that I made like this: ALTER TABLE logs ADD unique (host,date,time,priority,facility,seq); I see quite an improvement from what I was seeing before. The one thing that I didn't realize is that

RE: Indexing Questions (Problem?)

2005-02-03 Thread Tom Crimmins
> >>Do I need to make a special index to index time on HOUR? > Is it even > >>possible? > > > > I believe the index on time will work for this. > > No, it won't. At least, not with the query as is: > >SELECT * FROM logs >WHERE host IN ('10.20.254.5') > AND date='2005-02-03' >

Re: Indexing Questions (Problem?)

2005-02-03 Thread Michael Stassen
Tom Crimmins wrote: -Original Message- From: Brad Guillory Sent: Thursday, February 03, 2005 18:15 mysql> EXPLAIN SELECT * FROM logs WHERE host in ('10.20.254.5') and date='2005-02-03' and HOUR(time) between '16' and '17' ORDER BY seq DESC; ALTER TABLE logs ADD unique (host,dat

RE: Indexing Questions (Problem?)

2005-02-03 Thread Tom Crimmins
> -Original Message- > From: Brad Guillory > Sent: Thursday, February 03, 2005 18:15 > > Please be gentle, I have nearly no experience with SQL > databases. I am > not subscribed to the list so please cc me on replies. > > Because my email client probably did horrable things to this

Re: indexing operation running for few hours

2005-01-21 Thread Brent Baisley
Your key_buffer_size and sort_buffer_size configuration variables play a role in the speed of your indexes, including creation and modification. If these are set low, creating an index can be pretty slow. 43 minutes seems like and extremely long time to create an index on only 160K records. It

Re: Indexing...

2004-11-19 Thread Philippe Poelvoorde
Jeremiah Gowdy wrote: Can anyone tell me why this makes sense? I have a SELECT which uses an indexed datetime field called Start with a BETWEEN range. If I select on this with no LIMIT, it does a full scan of the 9391282 records in the DB (key=NULL). However, if I do a limit of any value LESS

Re: Indexing...

2004-11-19 Thread Gleb Paharenko
Hello. See: http://dev.mysql.com/doc/mysql/en/LIMIT_optimization.html > >"Jeremiah Gowdy" <[EMAIL PROTECTED]> wrote: >Can anyone tell me why this makes sense? I have a SELECT which uses an >indexed datetime >field called Start with a BETWEEN range. If I select on this with no LIMIT,

RE: Indexing for OR clauses

2004-10-05 Thread SGreen
IF you have a version of MySQL that is recent enough (4.0+) you can merge your two queries *when you run them* by using the UNION predicate. http://dev.mysql.com/doc/mysql/en/UNION.html Much better than a client-side merge. Shawn Green Database Administrator Unimin Corporation - Spruce Pine "D

RE: Indexing for OR clauses

2004-10-04 Thread David Turner
Thanks for the suggestions over the weekend! I will be looking in to this in a few days - for now I think I am just going to have to re-write my PHP script to make 2 separate queries and array_merge() them - which invariably seems to solve "OR" problems. But there should be a better way, no? -Da

Re: Indexing for OR clauses

2004-10-01 Thread mos
At 06:03 PM 10/1/2004, you wrote: Wondering if anyone can give me advice on indexing for OR clauses. I have a table with a number of fields, two of which are sender_id and receiver_id. I also have a query such as this: SELECT ... WHERE (sender_id = 98765 OR reciever_id = 98765) The query is OK for

RE: Indexing problem with UTF8 in 4.1.4?

2004-09-30 Thread Kevin Cowley
> -Original Message- > From: Harald Fuchs [mailto:[EMAIL PROTECTED] > Sent: 30 September 2004 12:16 > To: [EMAIL PROTECTED] > Subject: Re: Indexing problem with UTF8 in 4.1.4? > > In article > <[EMAIL PROTECTED]>, > Kevin Cowley <[EMAIL PROTECTED]>

Re: Indexing problem with UTF8 in 4.1.4?

2004-09-30 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, Kevin Cowley <[EMAIL PROTECTED]> writes: > If I knew why I wouldn't be asking. Now by our reconing the key of the > fields is 343 bytes, encoding in UTF8 makes that key 343 bytes Not 1000 > since under utf8 each character is encode in 8 bits. What makes you think s

RE: Indexing problem with UTF8 in 4.1.4?

2004-09-29 Thread Kevin Cowley
Kevin Cowley R&D Tel: 0118 902 9099 (direct line) Email: [EMAIL PROTECTED] Web: http://www.alchemetrics.co.uk > -Original Message- > From: gerald_clark [mailto:[EMAIL PROTECTED] > Sent: 29 September 2004 17:29 > To: Kevin Cowley > Cc: [EMAIL PROTECTED] > Subject

Re: Indexing problem with UTF8 in 4.1.4?

2004-09-29 Thread gerald_clark
Kevin Cowley wrote: Running 4.1.4 with a database that has a default encoding of UTF8 If we execute the following we get an error. CREATE TABLE idxbe_resident ( urn INT UNSIGNED NOT NULL, keyAddress_Part1 CHAR(5) BINARY NOT NULL, dataPerson_Name CHAR(60), dataAddress_Part1 CHAR(140), dataAddress_P

Re: indexing text

2004-06-12 Thread Johannes B. Ullrich
> I have a table that has a few short text fields [text(4000), text(1000)] > I would like to index. Do you think it is a good idea to index them > "simply", or is it better if I create auxilary fields which hold the MD5 > for the text fields and index those? Would that be faster? Try 'Fulltext

Re: indexing text

2004-06-11 Thread John Hicks
On Friday 11 June 2004 07:00 am, Fagyal, Csongor wrote: > Hi, > > I have a table that has a few short text fields > [text(4000), text(1000)] I would like to index. Do > you think it is a good idea to index them "simply", > or is it better if I create auxilary fields which > hold the MD5 for the tex

Re: indexing text

2004-06-11 Thread Pete McNeil
On Friday, June 11, 2004, 7:00:39 AM, Csongor wrote: FC> Hi, FC> I have a table that has a few short text fields [text(4000), text(1000)] FC> I would like to index. Do you think it is a good idea to index them FC> "simply", or is it better if I create auxilary fields which hold the MD5 FC> for th

Re: Indexing

2004-05-02 Thread Egor Egorov
John Mistler <[EMAIL PROTECTED]> wrote: > I know this is an elementary question, but I am getting two sets of > instructions from different MySQL manuals about setting an index on a prefix > of a column of a table. One says to use: > > KEY indexName (colName(length)) > > and the other says to us

Re: Indexing

2004-05-02 Thread Matt W
Hi John, - Original Message - From: "John Mistler" Sent: Sunday, May 02, 2004 12:50 AM Subject: Indexing > I know this is an elementary question, but I am getting two sets of > instructions from different MySQL manuals about setting an index on a prefix > of a column of a table. One say

RE: Indexing Woes

2004-02-11 Thread Chris Fossenier
nothing over 20mill for records. Chris. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 11, 2004 5:47 PM To: Chris Fossenier Cc: 'Peter Zaitsev'; 'MySQL List' Subject: RE: Indexing Woes These files will be created in the /tm

RE: Indexing Woes

2004-02-11 Thread vpendleton
;<<<<<<<<<< On 2/11/04, 5:42:31 PM, Chris Fossenier <[EMAIL PROTECTED]> wrote regarding RE: Indexing Woes: > None of my individual tables are larger than 12GB, however, I have no idea > if MySQL creates a separate TMP file for each indexing

RE: Indexing Woes

2004-02-11 Thread Chris Fossenier
] [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 11, 2004 5:13 PM To: Chris Fossenier Cc: 'Peter Zaitsev'; 'MySQL List' Subject: RE: Indexing Woes If I am reading your parameter correctly, MySQL will limit the size of the temporary file created to 30GB. If the file exce

RE: Indexing Woes

2004-02-11 Thread vpendleton
;>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<< On 2/11/04, 4:54:21 PM, Chris Fossenier <[EMAIL PROTECTED]> wrote regarding RE: Indexing Woes: > Can you provide a better explanation of these variables? I have yet to find >

RE: Indexing Woes

2004-02-11 Thread Chris Fossenier
al Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 11, 2004 4:50 PM To: Chris Fossenier Cc: 'Peter Zaitsev'; 'MySQL List' Subject: RE: Indexing Woes Performing your indexing in one batch will create a temp table only once as opposed t

RE: Indexing Woes

2004-02-11 Thread vpendleton
his to? > - my machine is dedicated to MySQL > Thanks. > Chris. > -Original Message- > From: Peter Zaitsev [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 11, 2004 2:03 PM > To: Chris Fossenier > Cc: 'MySQL List' > Subject: Re: Indexing Woes &

  1   2   >