| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Dan Nelson | Date: | September 4 2006 4:23am |
| Subject: | Re: problem with InnoDB | ||
| View as plain text | |||
In the last episode (Sep 04), prasad.ramisetti@stripped said: > Actually there is some requirement, where I need to know the number > of rows that I will get for my queries before actually executing the > query. Could you please suggest some way for this. Your best bet is to create an index on the smallest column you can find (maybe even create a char(1) and leave it empty), and "SELECT COUNT(*) FROM innotable USE INDEX (smallcolumn)". That way mysql only has to scan a small secondary index instead of the main table index. -- Dan Nelson dnelson@stripped
| Thread | ||
|---|---|---|
| • RE: problem with InnoDB | prasad.ramisetti | 4 Sep |
| • Re: problem with InnoDB | Dan Nelson | 4 Sep |
| • RE: problem with InnoDB | prasad.ramisetti | 7 Sep |
| • Re: problem with InnoDB | Chris | 7 Sep |
| • Re: problem with InnoDB | Douglas Sims | 7 Sep |
| • Re: problem with InnoDB | Dan Nelson | 7 Sep |
| • Re: problem with InnoDB | Douglas Sims | 7 Sep |
| • RE: problem with InnoDB | prasad.ramisetti | 7 Sep |
| • Re: problem with InnoDB | Jochem van Dieten | 7 Sep |
| • RE: problem with InnoDB | prasad.ramisetti | 7 Sep |
| • Re: problem with InnoDB | Paul McCullagh | 7 Sep |
| • Re: problem with InnoDB | Gabriel PREDA | 10 Sep |
