찾다
데이터 베이스MySQL 튜토리얼魔兽世界客户端数据研究(四):M2文件头分析

魔兽世界客户端数据研究(四):M2文件头分析

Jun 07, 2016 pm 03:39 PM
분석하다고객데이터문서연구아직워크래프트의 세계

终于决定,还是通过wow model viewer起手,研究一下WOW的数据类型,从另一个角度,体验一把这个唯一让我充过的游戏。 这将是一系列随笔,即在读代码的时候,顺便记录,以理清思路和加深映象。 其中会有很多让人费解的地方,如果有幸被某位兄弟看见 ,请勿见

终于决定,还是通过wow model viewer起手,研究一下WOW的数据类型,从另一个角度,体验一把这个唯一让我充过值的游戏。

这将是一系列随笔,即在读代码的时候,顺便记录,以理清思路和加深映象。 其中会有很多让人费解的地方,如果有幸被某位兄弟看见

,请勿见笑。

这都是第四篇关于M2文件格式的文章了,但是,对MD2文件格式的理解却还是九牛一毛,冰山一角。 仔细思考了一下,发现是不是自己一

开始走的路不对,因为是从半腰上分析的。 今天决定把文件头补上。 因为文件头可以大概看出一个文件是如何组织数据,以及包含哪些

数据的。

在此,给出WotLK的头文件定义
    char id[4];
    uint8 version[4];
    uint32 nameLength;
    uint32 nameOfs;
    uint32 GlobalModelFlags; // 1: tilt x, 2: tilt y, 4:, 8: add another field in header, 16: ; (no other flags as

of 3.1.1);

    uint32 nGlobalSequences; // AnimationRelated
    uint32 ofsGlobalSequences; // A list of timestamps.
    uint32 nAnimations; // AnimationRelated
    uint32 ofsAnimations; // Information about the animations in the model.
    uint32 nAnimationLookup; // AnimationRelated
    uint32 ofsAnimationLookup; // Mapping of global IDs to the entries in the Animation sequences block.
    //uint32 nD;
    //uint32 ofsD;
    uint32 nBones; // BonesAndLookups
    uint32 ofsBones; // Information about the bones in this model.
    uint32 nKeyBoneLookup; // BonesAndLookups
    uint32 ofsKeyBoneLookup; // Lookup table for key skeletal bones.

    uint32 nVertices; // GeometryAndRendering
    uint32 ofsVertices; // Vertices of the model.
    uint32 nViews; // GeometryAndRendering
    //uint32 ofsViews; // Views (LOD) are now in .skins.

    uint32 nColors; // ColorsAndTransparency
    uint32 ofsColors; // Color definitions.

    uint32 nTextures; // TextureAndTheifAnimation
    uint32 ofsTextures; // Textures of this model.

    uint32 nTransparency; // H,  ColorsAndTransparency
    uint32 ofsTransparency; // Transparency of textures.
    //uint32 nI;   // always unused ?
    //uint32 ofsI;
    uint32 nTexAnims;    // J, TextureAndTheifAnimation
    uint32 ofsTexAnims;
    uint32 nTexReplace; // TextureAndTheifAnimation
    uint32 ofsTexReplace; // Replaceable Textures.

    uint32 nTexFlags; // Render Flags
    uint32 ofsTexFlags; // Blending modes / render flags.
    uint32 nBoneLookup; // BonesAndLookups
    uint32 ofsBoneLookup; // A bone lookup table.

    uint32 nTexLookup; // TextureAndTheifAnimation
    uint32 ofsTexLookup; // The same for textures.

    uint32 nTexUnitLookup;        // L, TextureAndTheifAnimation, seems gone after Cataclysm
    uint32 ofsTexUnitLookup; // And texture units. Somewhere they have to be too.
    uint32 nTransparencyLookup; // M, ColorsAndTransparency
    uint32 ofsTransparencyLookup; // Everything needs its lookup. Here are the transparencies.
    uint32 nTexAnimLookup; // TextureAndTheifAnimation
    uint32 ofsTexAnimLookup; // Wait. Do we have animated Textures? Wasn't ofsTexAnims deleted? oO

    Sphere collisionSphere;
    Sphere boundSphere;

    uint32 nBoundingTriangles; // Miscellaneous
    uint32 ofsBoundingTriangles;
    uint32 nBoundingVertices; // Miscellaneous
    uint32 ofsBoundingVertices;
    uint32 nBoundingNormals; // Miscellaneous
    uint32 ofsBoundingNormals;

    uint32 nAttachments; // O, Miscellaneous
    uint32 ofsAttachments; // Attachments are for weapons etc.
    uint32 nAttachLookup; // P, Miscellaneous
    uint32 ofsAttachLookup; // Of course with a lookup.
    uint32 nEvents; //
    uint32 ofsEvents; // Used for playing sounds when dying and a lot else.
    uint32 nLights; // R
    uint32 ofsLights; // Lights are mainly used in loginscreens but in wands and some doodads too.
    uint32 nCameras; // S, Miscellaneous
    uint32 ofsCameras; // The cameras are present in most models for having a model in the Character-Tab.
    uint32 nCameraLookup; // Miscellaneous
    uint32 ofsCameraLookup; // And lookup-time again, unit16
    uint32 nRibbonEmitters; // U, Effects
    uint32 ofsRibbonEmitters; // Things swirling around. See the CoT-entrance for light-trails.
    uint32 nParticleEmitters; // V, Effects
    uint32 ofsParticleEmitters; // Spells and weapons, doodads and loginscreens use them. Blood dripping of a blade?

Particles.
};

在说明之前,有几个约定需要讲解一下,以便简单。 结构体中的 nXXXXX表示,有多少个这样的数据单元
而ofsXXXXXX表示,在哪里读取这个数据。  而每一个数据单元具体的大小和信息,则需要由额外的地方来定义。
在解释的时候,就不对nXXXXX和ofsXXXX多作解释了。

下面逐一说明各变量的作用的含意
id:  必然是 'M' 'D' '2' '0'
version:  用来检查文件版本的。 可以是以下值
     // 10 1 0 0 = WoW 5.0 models (as of 15464)
    // 10 1 0 0 = WoW 4.0.0.12319 models
    // 9 1 0 0 = WoW 4.0 models
    // 8 1 0 0 = WoW 3.0 models
    // 4 1 0 0 = WoW 2.0 models
    // 0 1 0 0 = WoW 1.0 models
nameLength和nameOfs 在WMV中,除了看到拿来检测数据合法性外,没有看到拿来读取数据的地方

GlobalModelFlags 模型的全局标志位,在WMV中除了看到用于输出外,没有看到有其它地方使用

nGlobalSequences和ofsGlobalSequences 一个全局数据序列,数据单元类型为UINT32

nAnimations和ofsAnimations 动画数据信息,数据单元类型由ModelAnimation定义,此定义在WMV中如下。
struct ModelAnimation
{
    uint32 animID; // AnimationDataDB.ID
    uint32 timeStart;
    uint32 timeEnd;

    float moveSpeed;

    uint32 flags;
    uint16 probability;
    uint16 unused;
    uint32 d1;
    uint32 d2;
    uint32 playSpeed;  // note: this can't be play speed because it's 0 for some models

    Sphere boundSphere;

    int16 NextAnimation;
    int16 Index;
};
它主要是定义一个动画的相关参数,比如ID,开始结束时间等等。

nAnimationLookup,动画数据查看表,主要是给外部提供一个查询的便利性,数据单元类型为UINT16

nBones,ofsBones 骨骼数据,数据单元类型为ModelBoneDef 其定义大致如下

struct ModelBoneDef {
    int32 keyboneid; // Back-reference to the key bone lookup table. -1 if this is no key bone.
    int32 flags; // Only known flags: 8 - billboarded and 512 - transformed
    int16 parent; // parent bone index
    int16 geoid; // A geoset for this bone.
    int32 unknown; // new int added to the bone definitions.  Added in WoW 2.0
    AnimationBlock translation; // (Vec3D)
    AnimationBlock rotation; // (QuatS)
    AnimationBlock scaling; // (Vec3D)
    Vec3D pivot;
};
可以看出,每个骨头都有一个ID,以及一些标志位,同时记录了其父骨骼的索引。 而骨骼本身,则有平移,旋转,缩放和锚点等数据。

nKeyBoneLookup也是一个提供快速查询的数据。 M2中很多对应的信息,都提供了这样的LOOK UP TABLE。 典型的以空间换时间的做法。

nVertices,ofsVertices 顶点信息,其数据单元定义如下
struct ModelVertex
{
    Vec3D pos;
    uint8 weights[4];
    uint8 bones[4];
    Vec3D normal;
    Vec2D texcoords;
    int unk1, unk2; // always 0,0 so this is probably unused
};
每一个顶点数据,有一个位置信息,4个骨骼索引和对应的权重 (其实貌似权重存3个就可以了。) 法线(法线貌似也只存两个FLOAT就

可以了。) 纹理坐标 以及两个没有摸索出用途的INT。  值得注意的是,WOW中的坐标用的是Z向上,Y向里的坐标。 如果要将WOW中的坐

标转换到左手坐标系(D3D默认)中。  则 X0,Y0,Z0 = X,Z,Y  若转换成右手坐标系(OPENGL默认) 则 X0,Y0,Z0 = X,Z,-Y.  这个在

前面分析数据的时候有说过。  因为在WMV中,就有转换坐标系相关的操作。

nViews, 此值表示模型有多少个LOD数据。 在WotLK版本以后,LOD数据全部被放入了 *.skin文件中。 不再在M2文件中读取。
假设一个模型为 ooxx.m2  那其对应的LOD文件信息可以为 ooxx00.skin  ooxx01.skin ooxx02.skin ooxx03.skin,而此M2模型的具体子

模型划分等细节,都在skin文件中了。

nColors,ofsColors 此模型用到的颜色序列,用于实现模型动态变色效果 其数据单元定义为

struct ModelColorDef {
    AnimationBlock color; // (Vec3D) Three floats. One for each color.
    AnimationBlock opacity; // (UInt16) 0 - transparent, 0x7FFF - opaque.
};

struct AnimationBlock {
    int16 type;        // interpolation type (0=none, 1=linear, 2=hermite)
    int16 seq;        // global sequence id or -1
    uint32 nRanges;
    uint32 ofsRanges;
    uint32 nTimes;
    uint32 ofsTimes;
    uint32 nKeys;
    uint32 ofsKeys;
};

nTextures,ofsTextures定义了此模型用到的纹理序列,其结构定义如下
#define    TEXTURE_MAX    32
struct ModelTextureDef
{
    uint32 type;
    uint32 flags;
    uint32 nameLen;
    uint32 nameOfs;
};
关于纹理相关的内容,得专门有一篇文章讲解一下才行。这个内容有点多,但是思路却很清楚清晰

nTransparency,ofsTransparency用于实现透明变化效果,其读取结构定义如下
struct ModelTransDef
{
    AnimationBlock trans; // (UInt16)
};
AnimationBlock的定义上面已经给出

nTexAnims 纹理动画,结构体定义如下
struct ModelTexAnimDef {
    AnimationBlock trans; // (Vec3D)
    AnimationBlock rot; // (QuatS)
    AnimationBlock scale; // (Vec3D)
};
这个表示在不同的情况下,纹理矩阵作用的效果,一些爆布,火盆上的火焰或者流动的岩浆就是通过这个实现的。

nTexReplace 字面上是可替换的纹理,在WMV中没有发现具体的用法。

nTexFlags 纹理标记位,在WMV中没有发现具体用法

nBoneLookup 骨骼查询表,在WMV中,除了拿来显示以外,没有看到特别的作用。

nTexLookup 纹理查询表,用于快速定位一个nTextures中读出来的纹理。

nTexUnitLookup 纹理单元查询表,和上面的功能类似,貌似CTM版本就没有使用到了。

nTransparencyLookup 透明信息查询表

nTexAnimLookup 纹理信息查询表

collisionSphere 碰撞球

boundSphere 包围球

nBoundingTriangles 构成包围网格的三角形数据 每个数据单元是UINT16

nBoundingVertices 构成包围网格的顶点数据 每个数据单元是Vec3D,即三个FLOAT

nBoundingNormals 构成包围网格的法线数据 数据同上

nAttachments挂接点的信息  每个挂接点的信息定义如下
struct ModelAttachmentDef
{
    uint32 id; // Just an id. Is referenced in the enum POSITION_SLOTS.
    uint32 bone; // Somewhere it has to be attached.
    Vec3D pos; // Relative to that bone of course.
    AnimationBlock unk; // (Int32) Its an integer in the data. It has been 1 on all models I saw. Whatever.
};

nAttachLookup 挂接点查询表,用于快速定位某个挂接点

nEvents 动画播放时的事件触发,用于完成一些特殊的,比如音效的播放,攻击方与受击方的动画吻合等。 定义如下
struct ModelEventDef
{
    char id[4]; // This is a (actually 3 character) name for the event with a $ in front.
    int32 dbid; // This data is passed when the event is fired.
    int32 bone; // Somewhere it has to be attached.
    Vec3D pos; // Relative to that bone of course.
    int16 type; // This is some fake-AnimationBlock.
    int16 seq; // Built up like a real one but without timestamps(?). What the fuck?
    uint32 nTimes; // See the documentation on AnimationBlocks at this topic.
    uint32 ofsTimes; // This points to a list of timestamps for each animation given.
};

关于ID的值,WMV中列出了一些摸索到的。
/*
There are a lot more of them. I did not list all up to now.
ID     Data     Description
DEST         exploding ballista, that one has a really fucked up block. Oo
POIN     unk     something alliance gunship related (flying in icecrown)
WHEE     601+     Used on wheels at vehicles.
$tsp         p is {0 to 3} (position); t is {W, S, B, F (feet) or R} (type); s is {R or L} (right or left); this is

used when running through snow for example.
$AHx         UnitCombat_C, x is {0 to 3}
$BRT         Plays some sound.
$BTH         Used for bubbles or breath. ("In front of head")
$BWP         UnitCombat_C
$BWR         Something with bow and rifle. Used in AttackRifle, AttackBow etc. "shoot now"?
$CAH         UnitCombat_C
$Cxx         UnitCombat_C, x is {P or S}
$CSD    SoundEntries.dbc     Emote sounds?
$CVS    SoundEntriesAdvanced.dbc     Sound
$DSE       
$DSL    SoundEntries.dbc     Sound with something special. Use another one if you always want to have it playing..
$DSO    SoundEntries.dbc     Sound
$DTH         UnitCombat_C, death, this plays death sounds and more.
$EMV         MapLoad.cpp
$ESD         Plays some emote sound.
$EWT         MapLoad.cpp
$FDx         x is {1 to 5}. Calls some function in the Object VMT. Also plays some sound.
$FDx         x is {6 to 9}. Calls some function in the Object VMT.
$FDX         Should do nothing. But is existant.
$FSD         Plays some sound.
$GCx         Play gameobject custom sound referenced in GameObjectDisplayInfo.dbc. x can be from {0 to 3}: {Custom0,

Custom1, Custom2, Custom3}
$GOx         Play gameobject sound referenced in GameObjectDisplayInfo.dbc. x can be from {0 to 5}: {Stand, Open,

Loop, Close, Destroy, Opened}
$HIT         Get hit?
$KVS         MapLoad.cpp
$SCD         Plays some sound.
$SHK    SpellEffectCameraShakes.dbc     Add a camera shake
$SHx         x is {L or R}, fired on Sheath and SheathHip. "Left/right shoulder" was in the old list.
$SMD         Plays some sound.
$SMG         Plays some sound.
$SND    SoundEntries.dbc     Sound
$TRD         Does something with a spell, a sound and a spellvisual.
$VGx         UnitVehicle_C, x is {0 to 8}
$VTx         UnitVehicle_C, x is {0 to 8}
$WxG         x is {W or N}. Calls some function in the Object VMT.
-------     ----------------------------------     - Old documentation (?) ----------------------------------------------
$CSx         x is {L or R} ("Left/right hand") (?)
$CFM       
$CHD         ("Head") (?)
$CCH         ("Bust") (?)
$TRD         ("Crotch") (?)
$CCH         ("Bust") (?)
$BWR         ("Right hand") (?)
$CAH       
$CST
*/

nLights 光照信息,标记了,模型的哪个骨骼上,挂接了灯光。 结构定义如下
struct ModelLightDef {
    int16 type; // 0: Directional, 1: Point light
    int16 bone; // If its attached to a bone, this is the bone. Else here is a nice -1.
    Vec3D pos; // Position, Where is this light?
    AnimationBlock ambientColor; // (Vec3D) The ambient color. Three floats for RGB.
    AnimationBlock ambientIntensity; // (Float) A float for the intensity.
    AnimationBlock diffuseColor; // (Vec3D) The diffuse color. Three floats for RGB.
    AnimationBlock diffuseIntensity; // (Float) A float for the intensity again.
    AnimationBlock attenuationStart; // (Float) This defines, where the light starts to be.
    AnimationBlock attenuationEnd; // (Float) And where it stops.
    AnimationBlock useAttenuation; // (Uint32) Its an integer and usually 1.
};

nCameras 真的不是太懂这个。 结构体定义如下

struct ModelCameraDef {
    int32 id; // 0 is potrait camera, 1 characterinfo camera; -1 if none; referenced in CamLookup_Table
    float fov; // No radians, no degrees. Multiply by 35 to get degrees.
    float farclip; // Where it stops to be drawn.
    float nearclip; // Far and near. Both of them.
    AnimationBlock transPos; // (Vec3D) How the cameras position moves. Should be 3*3 floats. (? WoW parses 36 bytes

= 3*3*sizeof(float))
    Vec3D pos; // float, Where the camera is located.
    AnimationBlock transTarget; // (Vec3D) How the target moves. Should be 3*3 floats. (?)
    Vec3D target; // float, Where the camera points to.
    AnimationBlock rot; // (Quat) The camera can have some roll-effect. Its 0 to 2*Pi.
};

nCameraLookup 摄相机信息查询表

nRibbonEmitters 此模型身上的多边形轨迹(缎带)效果数目。 结构体定义如下
struct ModelRibbonEmitterDef {
    int32 id;
    int32 bone;
    Vec3D pos;
    int32 nTextures;
    int32 ofsTextures;
    int32 nUnknown;
    int32 ofsUnknown;
    AnimationBlock color; // (Vec3D)
    AnimationBlock opacity; // (UInt16) And an alpha value in a short, where: 0 - transparent, 0x7FFF - opaque.
    AnimationBlock above; // (Float) The height above.
    AnimationBlock below; // (Float) The height below. Do not set these to the same!
    float res; // This defines how smooth the ribbon is. A low value may produce a lot of edges.
    float length; // The length aka Lifespan.
    float Emissionangle; // use arcsin(val) to get the angle in degree
    int16 s1, s2;
    AnimationBlock unk1; // (short)
    AnimationBlock unk2; // (boolean)
    int32 unknown; // This looks much like just some Padding to the fill up the 0x10 Bytes, always 0
};

最后一个值unknown是WotLK版本后新增的,不知道拿来干什么。 但可以肯定,WLK版本,加强了这个效果类型的表现力。

nParticleEmitters 粒子系统,结构体定义如下。
struct ModelParticleEmitterDefV10
{
    int32 id;
    int32 flags;
    Vec3D pos; // The position. Relative to the following bone.
    int16 bone; // The bone its attached to.
    int16 texture; // And the texture that is used.
    int32 nModelFileName;
    int32 ofsModelFileName;
    int32 nParticleFileName;
    int32 ofsParticleFileName; // TODO
    int8 blend;
    int8 EmitterType; // EmitterType     1 - Plane (rectangle), 2 - Sphere, 3 - Spline? (can't be bothered to find one)
    int16 ParticleColor; // This one is used so you can assign a color to specific particles. They loop over all
                         // particles and compare +0x2A to 11, 12 and 13. If that matches, the colors from the dbc get applied.
    int8 ParticleType; // 0 "normal" particle,
                       // 1 large quad from the particle's origin to its position (used in Moonwell water effects)
                       // 2 seems to be the same as 0 (found some in the Deeprun Tram blinky-lights-sign thing)
    int8 HeaderTail; // 0 - Head, 1 - Tail, 2 - Both
    int16 TextureTileRotation; // TODO, Rotation for the texture tile. (Values: -1,0,1)
    int16 cols; // How many different frames are on that texture? People should learn what rows and cols are.
    int16 rows; // (2, 2) means slice texture to 2*2 pieces
    AnimationBlock EmissionSpeed; // (Float) All of the following blocks should be floats.
    AnimationBlock SpeedVariation; // (Float) Variation in the flying-speed. (range: 0 to 1)
    AnimationBlock VerticalRange; // (Float) Drifting away vertically. (range: 0 to pi)
    AnimationBlock HorizontalRange; // (Float) They can do it horizontally too! (range: 0 to 2*pi)
    AnimationBlock Gravity; // (Float) Fall down, apple!
    AnimationBlock Lifespan; // (Float) Everyone has to die.
    int32 unknown;
    AnimationBlock EmissionRate; // (Float) Stread your particles, emitter.
    int32 unknown2;
    AnimationBlock EmissionAreaLength; // (Float) Well, you can do that in this area.
    AnimationBlock EmissionAreaWidth; // (Float)
    AnimationBlock Gravity2; // (Float) A second gravity? Its strong.
    ModelParticleParams p;
    AnimationBlock en; // (UInt16), seems unused in cataclysm
    int32 unknown3; // 12319, cataclysm
    int32 unknown4; // 12319, cataclysm
    int32 unknown5; // 12319, cataclysm
    int32 unknown6; // 12319, cataclysm
};

可见WOW在粒子这块的处理还是比较用心的,毕竟很多装备上都是这种效果,特别是武器,肩膀,头盔,盾牌等装备上的效果。
后面CTM中新增的4个INT,可能是为了加强效果用的。 说明WOW还在继续增强粒子系统的表现力。 也就是说,WOW中装备的表现力还是将会通过粒子系统来实现。

哇靠,又一点了。 发贴睡觉。。。。。

성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
MySQL에서 사용 가능한 다른 스토리지 엔진은 무엇입니까?MySQL에서 사용 가능한 다른 스토리지 엔진은 무엇입니까?Apr 26, 2025 am 12:27 AM

mysqloffersvariousStorageEngines, 각각의 everitedforentUsecases : 1) innodbisidealforapplicationsneedingAcidCoInceandHighConcurrency, 지원 트랜잭션 및 foreignKeys.2) myIsAmisbestforread-heverworkloads, memoryengineis

MySQL의 일반적인 보안 취약점은 무엇입니까?MySQL의 일반적인 보안 취약점은 무엇입니까?Apr 26, 2025 am 12:27 AM

MySQL의 일반적인 보안 취약점에는 SQL 주입, 약한 암호, 부적절한 권한 구성 및 업데이트되지 않은 소프트웨어가 포함됩니다. 1. 전처리 명령문을 사용하여 SQL 주입을 방지 할 수 있습니다. 2. 강력한 비밀번호 전략을 사용하여 약한 암호는 피할 수 있습니다. 3. 정기적 인 검토 및 사용자 권한 조정을 통해 부적절한 권한 구성을 해결할 수 있습니다. 4. Unupdated 소프트웨어는 MySQL 버전을 정기적으로 확인하고 업데이트하여 패치 할 수 있습니다.

MySQL에서 느린 쿼리를 어떻게 식별 할 수 있습니까?MySQL에서 느린 쿼리를 어떻게 식별 할 수 있습니까?Apr 26, 2025 am 12:15 AM

느린 쿼리 로그를 활성화하고 임계 값을 설정하여 MySQL에서 느린 쿼리를 식별 할 수 있습니다. 1. 느린 쿼리 로그를 활성화하고 임계 값을 설정하십시오. 2. 느린 쿼리 로그 파일을보고 분석하고 심층 분석을 위해 MySQLDumpSlow 또는 PT-Query 소수성과 같은 도구를 사용하십시오. 3. 인덱스 최적화, 쿼리 재 작성 및 select*의 사용을 피함으로써 느린 쿼리 최적화를 달성 할 수 있습니다.

MySQL 서버 건강 및 성능을 어떻게 모니터링 할 수 있습니까?MySQL 서버 건강 및 성능을 어떻게 모니터링 할 수 있습니까?Apr 26, 2025 am 12:15 AM

MySQL 서버의 건강 및 성능을 모니터링하려면 시스템 건강, 성능 지표 및 쿼리 실행에주의를 기울여야합니다. 1) 시스템 건강 모니터링 : CPU, 메모리, 디스크 I/O 및 네트워크 활동을 볼 수 있도록 상단, HTOP 또는 ShowGlobalStatus 명령을 사용하십시오. 2) 성능 표시기 추적 : 초당 쿼리 번호, 평균 쿼리 시간 및 캐시 적중률과 같은 주요 표시기를 모니터링합니다. 3) 쿼리 실행 최적화 확인 : 실행 시간이 설정 임계 값을 초과하는 쿼리를 느린 쿼리 로그를 활성화하고 기록 및 최적화하십시오.

MySQL 및 Mariadb를 비교하고 대조하십시오.MySQL 및 Mariadb를 비교하고 대조하십시오.Apr 26, 2025 am 12:08 AM

MySQL과 Mariadb의 주요 차이점은 성능, 기능 및 라이센스입니다. 1. MySQL은 Oracle에 의해 개발되었으며 Mariadb는 포크입니다. 2. MariaDB는 높은 하중 환경에서 더 나은 성능을 발휘할 수 있습니다. 3. Mariadb는 더 많은 스토리지 엔진과 기능을 제공합니다. 4.MySQL은 듀얼 라이센스를 채택하고 MariaDB는 완전히 오픈 소스입니다. 선택할 때 기존 인프라, 성능 요구 사항, 기능 요구 사항 및 라이센스 비용을 고려해야합니다.

MySQL의 라이센스는 다른 데이터베이스 시스템과 어떻게 비교됩니까?MySQL의 라이센스는 다른 데이터베이스 시스템과 어떻게 비교됩니까?Apr 25, 2025 am 12:26 AM

MySQL은 GPL 라이센스를 사용합니다. 1) GPL 라이센스는 MySQL의 무료 사용, 수정 및 분포를 허용하지만 수정 된 분포는 GPL을 준수해야합니다. 2) 상업용 라이센스는 공개 수정을 피할 수 있으며 기밀이 필요한 상업용 응용 프로그램에 적합합니다.

MyISAM을 통해 언제 innodb를 선택 하시겠습니까?MyISAM을 통해 언제 innodb를 선택 하시겠습니까?Apr 25, 2025 am 12:22 AM

MyISAM 대신 InnoDB를 선택할 때의 상황에는 다음이 포함됩니다. 1) 거래 지원, 2) 높은 동시성 환경, 3) 높은 데이터 일관성; 반대로, MyISAM을 선택할 때의 상황에는 다음이 포함됩니다. 1) 주로 읽기 작업, 2) 거래 지원이 필요하지 않습니다. InnoDB는 전자 상거래 플랫폼과 같은 높은 데이터 일관성 및 트랜잭션 처리가 필요한 응용 프로그램에 적합하지만 MyISAM은 블로그 시스템과 같은 읽기 집약적 및 트랜잭션이없는 애플리케이션에 적합합니다.

MySQL에서 외국 키의 목적을 설명하십시오.MySQL에서 외국 키의 목적을 설명하십시오.Apr 25, 2025 am 12:17 AM

MySQL에서 외국 키의 기능은 테이블 간의 관계를 설정하고 데이터의 일관성과 무결성을 보장하는 것입니다. 외국 키는 참조 무결성 검사 및 계단식 작업을 통해 데이터의 효과를 유지합니다. 성능 최적화에주의를 기울이고 사용할 때 일반적인 오류를 피하십시오.

See all articles

핫 AI 도구

Undresser.AI Undress

Undresser.AI Undress

사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover

AI Clothes Remover

사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool

Undress AI Tool

무료로 이미지를 벗다

Clothoff.io

Clothoff.io

AI 옷 제거제

Video Face Swap

Video Face Swap

완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

뜨거운 도구

MinGW - Windows용 미니멀리스트 GNU

MinGW - Windows용 미니멀리스트 GNU

이 프로젝트는 osdn.net/projects/mingw로 마이그레이션되는 중입니다. 계속해서 그곳에서 우리를 팔로우할 수 있습니다. MinGW: GCC(GNU Compiler Collection)의 기본 Windows 포트로, 기본 Windows 애플리케이션을 구축하기 위한 무료 배포 가능 가져오기 라이브러리 및 헤더 파일로 C99 기능을 지원하는 MSVC 런타임에 대한 확장이 포함되어 있습니다. 모든 MinGW 소프트웨어는 64비트 Windows 플랫폼에서 실행될 수 있습니다.

Atom Editor Mac 버전 다운로드

Atom Editor Mac 버전 다운로드

가장 인기 있는 오픈 소스 편집기

VSCode Windows 64비트 다운로드

VSCode Windows 64비트 다운로드

Microsoft에서 출시한 강력한 무료 IDE 편집기

SublimeText3 Linux 새 버전

SublimeText3 Linux 새 버전

SublimeText3 Linux 최신 버전

DVWA

DVWA

DVWA(Damn Vulnerable Web App)는 매우 취약한 PHP/MySQL 웹 애플리케이션입니다. 주요 목표는 보안 전문가가 법적 환경에서 자신의 기술과 도구를 테스트하고, 웹 개발자가 웹 응용 프로그램 보안 프로세스를 더 잘 이해할 수 있도록 돕고, 교사/학생이 교실 환경 웹 응용 프로그램에서 가르치고 배울 수 있도록 돕는 것입니다. 보안. DVWA의 목표는 다양한 난이도의 간단하고 간단한 인터페이스를 통해 가장 일반적인 웹 취약점 중 일부를 연습하는 것입니다. 이 소프트웨어는