Table of Contents
回复内容:
Home Backend Development PHP Tutorial 想問下,在部署環境中,混用myISAM和InnoDB會有什麼問題?

想問下,在部署環境中,混用myISAM和InnoDB會有什麼問題?

Jun 06, 2016 pm 08:46 PM
innodb laravel myisam mysql php

是這樣的。

用Laravel框架,數據庫本來是myISAM。

但是引用一些庫後,自動生成了一些InnoDB結構的table。

所以想問問:

  1. 這樣混用會有什麼問題麼?
  2. Laravel有什麼方法強制數據庫為myISAM?

回复内容:

是這樣的。

用Laravel框架,數據庫本來是myISAM。

但是引用一些庫後,自動生成了一些InnoDB結構的table。

所以想問問:

  1. 這樣混用會有什麼問題麼?
  2. Laravel有什麼方法強制數據庫為myISAM?

1、可以混用,因为数据库的设计,就要要考虑自己的需求对表引擎进行合适的选择,一个库中使用多个存储引擎很正常,唯一要注意的是,遇到事务需要同时操作myisam和innodb时,myisam最好在事务之前操作或者事务完成之后操作。
2、不建议转,说不定你那些库就是使用了innodb的特性,如果你确认库没有使用innodb特性,在考虑转吧。

时至今日,不用想了,myisam和innodb比没有任何优势,

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

PHP Tutorial
1502
276
VSCode settings.json location VSCode settings.json location Aug 01, 2025 am 06:12 AM

The settings.json file is located in the user-level or workspace-level path and is used to customize VSCode settings. 1. User-level path: Windows is C:\Users\\AppData\Roaming\Code\User\settings.json, macOS is /Users//Library/ApplicationSupport/Code/User/settings.json, Linux is /home//.config/Code/User/settings.json; 2. Workspace-level path: .vscode/settings in the project root directory

How to implement a referral system in Laravel? How to implement a referral system in Laravel? Aug 02, 2025 am 06:55 AM

Create referrals table to record recommendation relationships, including referrals, referrals, recommendation codes and usage time; 2. Define belongsToMany and hasMany relationships in the User model to manage recommendation data; 3. Generate a unique recommendation code when registering (can be implemented through model events); 4. Capture the recommendation code by querying parameters during registration, establish a recommendation relationship after verification and prevent self-recommendation; 5. Trigger the reward mechanism when recommended users complete the specified behavior (subscription order); 6. Generate shareable recommendation links, and use Laravel signature URLs to enhance security; 7. Display recommendation statistics on the dashboard, such as the total number of recommendations and converted numbers; it is necessary to ensure database constraints, sessions or cookies are persisted,

Using PHP for Data Scraping and Web Automation Using PHP for Data Scraping and Web Automation Aug 01, 2025 am 07:45 AM

UseGuzzleforrobustHTTPrequestswithheadersandtimeouts.2.ParseHTMLefficientlywithSymfonyDomCrawlerusingCSSselectors.3.HandleJavaScript-heavysitesbyintegratingPuppeteerviaPHPexec()torenderpages.4.Respectrobots.txt,adddelays,rotateuseragents,anduseproxie

What are Repository Contracts in Laravel? What are Repository Contracts in Laravel? Aug 03, 2025 am 12:10 AM

The Repository pattern is a design pattern used to decouple business logic from data access logic. 1. It defines data access methods through interfaces (Contract); 2. The specific operations are implemented by the Repository class; 3. The controller uses the interface through dependency injection, and does not directly contact the data source; 4. Advantages include neat code, strong testability, easy maintenance and team collaboration; 5. Applicable to medium and large projects, small projects can use the model directly.

How to use accessors and mutators in Eloquent in Laravel? How to use accessors and mutators in Eloquent in Laravel? Aug 02, 2025 am 08:32 AM

AccessorsandmutatorsinLaravel'sEloquentORMallowyoutoformatormanipulatemodelattributeswhenretrievingorsettingvalues.1.Useaccessorstocustomizeattributeretrieval,suchascapitalizingfirst_nameviagetFirstNameAttribute($value)returningucfirst($value).2.Usem

How to create a RESTful API with Laravel? How to create a RESTful API with Laravel? Aug 02, 2025 pm 12:31 PM

Create a Laravel project and configure the database environment; 2. Use Artisan to generate models, migrations and controllers; 3. Define API resource routing in api.php; 4. Implement the addition, deletion, modification and query methods in the controller and use request verification; 5. Install LaravelSanctum to implement API authentication and protect routes; 6. Unify JSON response format and handle errors; 7. Use Postman and other tools to test the API, and finally obtain a complete and extensible RESTfulAPI.

python type hint function example python type hint function example Jul 31, 2025 am 04:19 AM

Using type prompts in Python improves code readability and maintainability and supports static checking. 1. Basic type prompts such as defgreet(name:str,age:int)->str:returnf"Hello,{name}.Youare{age}yearsold." 2. Complex types need to be imported List, Dict, and Optional, such as List[Dict[str,Optional[int]]] represents a dictionary list, the value can be int or None, and the return Optional[str] means that you can return str or None; 3. Union[int

Understanding MVC: How Laravel Implements the Model-View-Controller Pattern Understanding MVC: How Laravel Implements the Model-View-Controller Pattern Aug 02, 2025 am 01:04 AM

LaravelimplementstheMVCpatternbyusingModelsfordatamanagement,Controllersforbusinesslogic,andViewsforpresentation.1)ModelsinLaravelarepowerfulORMshandlingdataandrelationships.2)ControllersmanagetheflowbetweenModelsandViews.3)ViewsuseBladetemplatingfor

See all articles