[PHP-DB] int(1) and int(11)

2008-08-24 Thread Shelley
Hi all, Is there any difference between int(1) and int(11) when creating a table? I checked the mysql manual and got that 1 and 11 are used to specify the display width of an column. Is there any other difference? Any ideas appreciated. Thx. -- With best regards, Shelley Shyan http

[PHP-DB] Re: [PHP] Best practices for using MySQL index

2008-04-30 Thread Shelley
On Wed, Apr 30, 2008 at 7:03 PM, Aschwin Wesselius <[EMAIL PROTECTED]> wrote: > Shelley wrote: > > Don't index just all integer fields. Keep track of the cardinality of a > column. If you expect a field to have 100.000 records, but with only 500 > distinct values it

[PHP-DB] Re: [PHP] Best practices for using MySQL index

2008-04-30 Thread Shelley
On Wed, Apr 30, 2008 at 5:14 PM, Aschwin Wesselius <[EMAIL PROTECTED]> wrote: > Shelley wrote: > > > Hi all, > > > > I am currently responsible for a subscription module and need to design > > the > > DB tables and write code. > > > > I

[PHP-DB] Best practices for using MySQL index

2008-04-29 Thread Shelley
time the table will hold millions of records. So the query and index optimization is very important. Any suggestion will be greatly appreciated. -- Regards, Shelley

Re: [PHP-DB] Table optimization ideas needed

2008-03-27 Thread Shelley
atter how long they take to run > Hm... This makes sense. :) I indeed have several slaves running. Great. Thank you. Thank you for all your help. > > > -- > Postgresql & php tutorials > http://www.designmagick.com/ > -- Regards, Shelley

Re: [PHP-DB] Table optimization ideas needed

2008-03-26 Thread Shelley
FOR EACH ROW > CALL cinema.CHECKFILM('Old boy'); > > It works. The trigger is perform and do its job. The only request is to > use the word 'AFTER' when you call your trigger. 'BEFORE' doesn't work (the > trigger is called ans work but the insert failed in all case). > > > > > > -- > Postgresql & php tutorials > http://www.designmagick.com/ > -- Regards, Shelley

Re: [PHP-DB] Re: Table optimization ideas needed

2008-03-26 Thread Shelley
me using mysql, some using postgres, some using > oracle etc). > Thanks. > > > -- > Postgresql & php tutorials > http://www.designmagick.com/ > -- Regards, Shelley

Re: [PHP-DB] Table optimization ideas needed

2008-03-26 Thread Shelley
uestions is: > > What's your practice to optimize tables like that? > > I thought that's what you needed help with. ? > No. That's only part of it. I have a cron job, which get the total visits often. > > > -- > Postgresql & php tutorials > http://www.designmagick.com/ > -- Regards, Shelley

Re: [PHP-DB] Table optimization ideas needed

2008-03-26 Thread Shelley
Thank you very much, Chris. :) Fyi, On Wed, Mar 26, 2008 at 1:27 PM, Chris <[EMAIL PROTECTED]> wrote: > Shelley wrote: > > > > > +--+---+--+-+---++ > > | Field| Type

[PHP-DB] Re: Table optimization ideas needed

2008-03-26 Thread Shelley
that. Actually, I wonder how facebook is dealing with this matter. Somebody knows? On Wed, Mar 26, 2008 at 10:05 PM, Roberto Mansfield <[EMAIL PROTECTED]> wrote: > Shelley wrote: > > Hi all, > > > > I made a post a week ago to ask for the idea of the fastest way t

Re: [PHP-DB] Re: Table optimization ideas needed

2008-03-26 Thread Shelley
Yes, Chris. You are right. I think I mentioned in the archive that the table is Innodb engined. Maybe Roberto didn't notice that. On Thu, Mar 27, 2008 at 7:26 AM, Chris <[EMAIL PROTECTED]> wrote: > Roberto Mansfield wrote: > > > Shelley wrote: > > > > > Hi

Re: [PHP-DB] Table optimization ideas needed

2008-03-25 Thread Shelley
cords. On Wed, Mar 26, 2008 at 10:20 AM, Chris <[EMAIL PROTECTED]> wrote: > Shelley wrote: > > Yes, Index can help a lot. > > But actually there has been five indices. The table takes 1.4G space > > while the indices take 2.3G. > > The select sentence is still slow

Re: [PHP-DB] Table optimization ideas needed

2008-03-25 Thread Shelley
Yes, Index can help a lot. But actually there has been five indices. The table takes 1.4G space while the indices take 2.3G. The select sentence is still slow. :( On Tue, Mar 25, 2008 at 11:50 AM, Chris <[EMAIL PROTECTED]> wrote: > Shelley wrote: > > Hi all, > > > >

[PHP-DB] Table optimization ideas needed

2008-03-24 Thread Shelley
ql such as "select a,b from table_name where c='d'" will take. I have a lot of tables like that. So my questions is: What's your practice to optimize tables like that? Thanks in advance. -- Regards, Shelley -- PHP Database Mailing List (http://www.php.net/) To uns

[PHP-DB] Table optimization ideas needed

2008-03-24 Thread Shelley
ql such as "select a,b from table_name where c='d'" will take. I have a lot of tables like that. So my questions is: What's your practice to optimize tables like that? Thanks in advance. -- Regards, Shelley -- PHP Database Mailing List (http://www.php.net/) To uns

[PHP-DB] rtrim a string with MySQL's function

2007-12-04 Thread Shelley Shyan
c123, 123; 456789, 456789; Is there a faster way to manage that? The faster, the better. :) Thank you for your consideration and waiting for your answer. :) Regards, Shelley -- PHP Database Ma