idex usages in updates

2004-09-28 Thread Arthur Radulescu
Hello! Could anyone tell me if updates in multiple tables also make use of table indexes? And if they do does it works in the same general manner as it does for select clauses? Thanks, Arthur

Re: problems counting the number of returned rows

2004-09-07 Thread Arthur Radulescu
he manual first if > it's a live system) > > Andy > > > -Original Message- > > From: Arthur Radulescu [mailto:[EMAIL PROTECTED] > > Sent: 07 September 2004 15:03 > > To: Andy Eastham; Mysql List > > Subject: Re: problems counting the number

Re: problems counting the number of returned rows

2004-09-07 Thread Arthur Radulescu
egory) from books > where category=1 limit 0,10 > > ie change "*" to "category" (which can be read from the index)? > > Andy > > > -Original Message- > > From: Arthur Radulescu [mailto:[EMAIL PROTECTED] > > Sent: 07 September 2004 14:23

problems counting the number of returned rows

2004-09-07 Thread Arthur Radulescu
Hello! I am having a problem retrieving the number of records matching a certain condition from the database. I have a large table of about 3 millions records A simple query like the one below returns me the results select * use index(category) from books where category=1 limit 0,10 This query

problems with SQL_CALC_FOUND_ROWS [repost]

2004-04-26 Thread Arthur Radulescu
Hello! I am facing a problem when using SQL_CALC_FOUND_ROWS in certain queries. The query where I am ordering by a column is much more slowly than the same query NOT using SQL_CALC_FOUND_ROWS select SQL_CALC_FOUND_ROWS * from table by date desc - this query takes about 1.2 s select * from table

enum or tinyint?

2004-04-25 Thread Arthur Radulescu
What is recommanded for a large database to use enum or tinyint? Should I store active inactive or tinyint (1) with 0 and 1? Thanks, Arthur -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

problems with SQL_CALC_FOUND_ROWS

2004-04-22 Thread Arthur Radulescu
Hello! I am facing a problem when using SQL_CALC_FOUND_ROWS in certain queries. The query where I am ordering by a column is much more slowly than the same query NOT using SQL_CALC_FOUND_ROWS select SQL_CALC_FOUND_ROWS * from table by date desc - this query takes about 1.2 s select * from table

Re: how to speed up a simple query? can anyone help with an ideea?

2004-04-21 Thread Arthur Radulescu
> Creating a combined index can help MySQL in using this index for both the > where condition and the order by clause. > Try the query with an index on cat,date and with date,cat; maybe one will be > faster than the other. This partially solved my problem. Thanks a lot. However I am facing a new p

Re: how to speed up a simple query? need some help here...

2004-04-20 Thread Arthur Radulescu
> Create composite index on (cat, date). Use EXPLAIN to see if MySQL uses index: > http://dev.mysql.com/doc/mysql/en/EXPLAIN.html This partially solved my problem. Thanks a lot. However I am facing a new problem here. The query where I am ordering by a column is much more slowly than the same que

Re: how to speed up a simple query? can anyone help with an ideea?

2004-04-20 Thread Arthur Radulescu
> 1. MySQL only uses one index for each table in a JOIN; this query only uses > one table, so only one index is used. > 2. DESC is slower than ASC > 3. Try creating an index on two columns; try cat and date, and try date and > cat. > 4. Check EXPLAIN SELECT id,name.. to see whether the right in

how to speed up a simple query? can anyone help with an ideea?

2004-04-20 Thread Arthur Radulescu
Hello! I have a simple query on a table of about 1,000,000 records... The table is optimized and the query is pretty simple at this moment... something like this select id,name,desc,cat,date from table where cat='12' however I need to order the results by date desc... I have indexes on both the

how to speed up a simple query?

2004-04-19 Thread Arthur Radulescu
Hello! I have a simple query on a table of about 1,000,000 records... The table is optimized and the query is pretty simple at this moment... something like this select id,name,desc,cat,date from table where cat='12' however I need to order the results by date desc... I have indexes on both the

query with or without quotes

2004-04-16 Thread Arthur Radulescu
Just by curiosity is there any difference between this 2 queries select * from users where users_id=10 and select * from users where users_id='10' assuming that the users_id column is of type integer primary key (if it would be varchat I know there is a big difference)

autoincrement column

2004-04-08 Thread Arthur Radulescu
Before switching to version 4.0.18 of MySQL the command "delete from table" was also reseting the autonincrement column value... It seems that this is not happening anymore after we have installed this version... Any idee about this problem? Is there any other way to reset this? Arthur -- MyS

Re: Using PHP to copy tables

2004-04-08 Thread Arthur Radulescu
Try using such command from PHP... system("$MYSQLDUMP --opt --user=$USER --password=$PASSWORD $DATABASE_NAME $GZIP - > $BKDIR/$newfile.gz",$status); where $MYSQLDUMP is the mysqldump path $GZIP is the path to gzip $BKDIR is the path to the backup folder

How to query???

2001-01-24 Thread Arthur Radulescu
Can anyone help me with this query??? I have a very big table (70.000 rows) which has several rows like this: idproductdescription 1P1desc1 2P1desc2 and I want to transform it into: idproductdescription 1

How to query???

2001-01-24 Thread Arthur Radulescu
Can anyone help me with this query??? I have a very big table (70.000 rows) which has several rows like this: idproductdescription 1P1desc1 2P1desc2 and I want to transform it into: idproductdescription 1

How to query???

2001-01-24 Thread Arthur Radulescu
Can anyone help me with this query??? I have a very big table (70.000 rows) which has several rows like this: idproductdescription 1P1desc1 2P1desc2 and I want to transform it into: idproductdescription 1

2 questions!

2001-01-15 Thread Arthur Radulescu
Hi! I have 2 questions! 1.What is more eficient to keep some images into a table or to keep their names in the table and images separated in a directory? 2.How can I join to big tables and verify if there are any duplicates (i have tried just to view the data from those tables with something