adburne el Thursday, July 15, 2004, 12:45:05 PM, escribió:

aaca> matt on Thursday, July 15, 2004, 11:58:31 AM, wrote:

 >>>Consider replicating to some slave servers and dividing reads among them.

mr>> I already replicate to slaves, and sites will do read only queries off
mr>> these slaves

mr>> 99.9 % of the tables are read only anyway, the only tables we update or
mr>> insert into, are very very small and fast.

mr>> These big tables are daily extracts from IBM DB2 sites, in ebcdic
mr>> format, we archive the data and users then query our site which is
mr>> faster, unless they start doing multiple query options, then things get
mr>> slow.

mr>> If you query only one feild its FAST, but if you query two feilds, its
mr>> slow, very slow, need multiple key per query support in mysql.


aaca> One thing that can help (at least for me) is working with temporary
aaca> tables, spliting one complex query in many littles.

aaca> A simple example:
aaca> 2 tables: header and details

aaca> CREATE TEMPORARY TABLE tmp TYPE=HEAP
aaca> SELECT hdr_code FROM header WHERE ...;

aaca> ALTER TABLE tmp ADD PRIMARY KEY(hdr_code);

aaca> SELECT d.* FROM details d INNER JOIN tmp
aaca> ON d.hdr_code=tmp.hdr_code WHERE ...;

aaca> DROP TABLE TMP;

aaca> -- 
aaca> Alejandro D. Burne
aaca> Departamento de Sistemas
aaca> Asociación Médica Rosario
aaca> España 401 - S2000SBI
aaca> Rosario - Santa Fe - Argentina
aaca> +54-0341-4252313 Interno 145

I'm sorry this was an answer to Patrick Drouin

-- 
Alejandro D. Burne
Departamento de Sistemas
Asociación Médica Rosario
España 401 - S2000SBI
Rosario - Santa Fe - Argentina
+54-0341-4252313 Interno 145



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to