how to define the correct index

2009-06-16 Thread Yariv Omer
Hi I have the following problem I have a table with 3 fields ('Field_A', 'Field_B', 'Field_C') My query is: Select Field_A from table where Field_b=10 order by Field_c ASC; I have performance issues even when i have tried to define index for this table How should i define the corerct index (b

slow select when using VIEW

2009-06-10 Thread Yariv Omer
Hi I have created the following 2 views: CREATE VIEW `cpes_noise_num` AS SELECT cpes_dsl_line_stats.id_cpes, sum(IF(cpes_dsl_line_stats.snr_downstream < (SELECT snr_downstream FROM admin_configs WHERE admin_id =0),1,0)) AS snr_downstream, sum(IF((cpes_dsl_line_stats.bit_errors / cpes_dsl

Select field with multiple values using LIKE

2009-03-23 Thread Yariv Omer
Hi when I am using a query for several field's values I am using the following query: Select field from table where in ('11', '22') I need to do a LIKE search (not exact match but like match) How can I do it Thanks, Yariv -- MySQL General Mailing List For list archives: http://lists.mysql

like isn't behave as expected

2009-02-04 Thread Yariv Omer
Hi i have one row in the cpe_id column of the cpe_users table in my database with the value: "d\d". when i am doing:select cpe_id from cpe_users where cpe_id = 'd\\d' >> I got the one result. when i am doing:select cpe_id from cpe_users where cpe_id like 'd\\d' >> I don't get any result! wh