List:General Discussion« Previous MessageNext Message »
From:Harish Gabbita Date:June 27 2005 2:17pm
Subject:Enhance a query
View as plain text  
Hi Everybody,

I am using MySql 4.0.21 standard version. I have a profile table with the
structure in similar manner:

mysql> select A0,A1,A14,A15,A19,Split from PROFILE where A1=100;
+-------+-----+-----+-----+-----+------+
| A0    | A1  | A14 | A15 | A19 | Split|
+-------+-----+-----+-----+-----+------+
| 10005 | 100 |   0 |   0 |   1 | OLD  |
| 10006 | 100 |   0 |   0 |   1 | OLD  |
| 20005 | 100 |   0 |   0 |   1 | OLD  |
| 30005 | 100 |   0 |   0 |   1 | OLD  |
+-------+-----+-----+-----+-----+------+


In this table, I would like to get a single row for value A1=100 and
A14=0,A15=0 and A19=1. I am currently using Limit 1 in the select query.

Note: My data is not based on A0 data.

If the table runs into millions of rows, is it a good suggestion to use
Limit. Or Is there any alternative?


Thanks,
Harish



Thread
LEFT JOIN?Angelo Zanetti8 Jun
  • Re: LEFT JOIN?SGreen8 Jun
    • Re: LEFT JOIN?Angelo Zanetti8 Jun
      • Re: LEFT JOIN?Michael Stassen8 Jun
        • Re: LEFT JOIN?Angelo Zanetti8 Jun
          • Re: LEFT JOIN?SGreen8 Jun
  • Re: LEFT JOIN?Alec.Cawley8 Jun
Re: LEFT JOIN?Michael Stassen8 Jun
  • Re: [SOLVED]LEFT JOIN?Angelo Zanetti9 Jun
    • Enhance a queryHarish Gabbita27 Jun
      • Re: Enhance a querySGreen27 Jun